Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruff is causing PR checks to fail #3014

Closed
int-y1 opened this issue Aug 9, 2023 · 2 comments · Fixed by #3015
Closed

ruff is causing PR checks to fail #3014

int-y1 opened this issue Aug 9, 2023 · 2 comments · Fixed by #3015

Comments

@int-y1
Copy link
Contributor

int-y1 commented Aug 9, 2023

PR checks are failing on "Run make check" due to this error:

ruff .
Error: codespell_lib/_codespell.py:194:17: PLE1300 Unsupported format character '}'
make: *** [Makefile:42: ruff] Error 1
Error: Process completed with exit code 2.

Recently, the ruff version increased from ruff-0.0.282 to ruff-0.0.283. Either fix the Python code, or downgrade ruff.

@DimitriPapadopoulos
Copy link
Collaborator

The relevant line is:

"{0}{1:{width}}".format(key, self.summary.get(key), width=15 - len(key))

The above Python code seems legal to me. From Format String Syntax:

A format_spec field can also include nested replacement fields within it. These nested replacement fields may contain a field name, conversion flag and format specification, but deeper nesting is not allowed.

@int-y1 Do you have reasons to believe the Python code needs to be fixed? If that were the case, I would rather fix the Python code.

@DimitriPapadopoulos
Copy link
Collaborator

I have opened bug report astral-sh/ruff#6442 neverthless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants