-
Notifications
You must be signed in to change notification settings - Fork 150
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
Apply ruff/flake8-implicit-str-concat rule ISC001 #615
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #615 +/- ##
=======================================
Coverage 71.09% 71.09%
=======================================
Files 13 13
Lines 1083 1083
=======================================
Hits 770 770
Misses 313 313 ☔ View full report in Codecov by Sentry. |
I think what would be best is to actually add the relevant |
It is not compatible with |
In the link issue, this is discussed and, as far as I could understand, ISC001 is not actually incompatible with the formatter. |
It's still in the conflict list. |
I could change: Lines 20 to 25 in 376373b
into: - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.3
hooks:
- id: ruff
args: [--fix, --show-fixes]
- id: ruff-format
- id: ruff
args: [ --select, ISC001, --fix, --show-fixes ] |
Rule ISC001 is currently in the formatter conflict list: https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules As a workaround, run the linter specifically for rule ISC001 after the formatter: astral-sh/ruff#8272 (comment) The usual sequence is to run the linter with before the formatter.
Actually I now have a sweeping change commit locally that would do all this, and more. |
https://docs.astral.sh/ruff/rules/printf-string-formatting/ This rule is enfoirced by newer versions of ruff (> 0.3.5).
These sweeping changes covered all of the changes here, so I'm closing this PR as no longer necessary. Thanks for bringing this up! |
Now I get this warning whenever I run ruff: $ ruff format
warning: The following rules may cause conflicts when used with the formatter: `ISC001`. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding them to the `ignore` configuration.
54 files left unchanged
$ |
https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/