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 format with quote-style = "preserve" should not show ICS001 and flake8-quotes.multiline-quotes warnings #11063

Open
57an opened this issue Apr 21, 2024 · 1 comment
Labels
bug Something isn't working help wanted Contributions especially welcome

Comments

@57an
Copy link

57an commented Apr 21, 2024

While running ruff format with quote-style = "preserve" option I get such warnings

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.
warning: The `flake8-quotes.multiline-quotes="single"` option is incompatible with the formatter. We recommend disabling `Q001` when using the formatter, which enforces double quotes for multiline strings. Alternatively, set the `flake8-quotes.multiline-quotes` option to `"double"`.`

I think with quote-style = "preserve" options ruff should not show this warnings, because this option forces string quotes format to be unchanged.

@MichaReiser MichaReiser added bug Something isn't working help wanted Contributions especially welcome labels Apr 21, 2024
@MichaReiser
Copy link
Member

MichaReiser commented Apr 21, 2024

I agree that the flake8-quotes.multiline-quotes should not be shown. However, the option quote-style: "preserve" does not resolve the incompatibility to ISC001 as you can see here https://play.ruff.rs/569c1110-6903-4622-8694-157b243ea73d where the second string is marked as violating ISC001 (you may need to make a small whitespace change for the warning to show up)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Contributions especially welcome
Projects
None yet
Development

No branches or pull requests

2 participants