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

flake8's (W503 and) W504 #4125

Closed
jamesbraza opened this issue Apr 26, 2023 · 5 comments
Closed

flake8's (W503 and) W504 #4125

jamesbraza opened this issue Apr 26, 2023 · 5 comments
Labels
question Asking for support or clarification

Comments

@jamesbraza
Copy link
Contributor

flake8 has two rules W503 and W504 that don't seem to be in ruff==0.0.263.

Any thoughts on ruff implementing W504 with autofix?

@charliermarsh
Copy link
Member

I think we're unlikely to implement W503 and W504, since we're likely not going to implement the pycodestyle rules that are ignored-by-default (due to being non-unanimously accepted, and non-violations of PEP8, per the pycodestyle docs).

W503 is a little more problematic, since it conflicts with Black. W504 might not conflict with Black, but I'm still hesitant to support it given that it's disabled-by-default in pycodestyle and Flake8.

@charliermarsh charliermarsh added the question Asking for support or clarification label Apr 27, 2023
@charliermarsh
Copy link
Member

(As always, totally open to further discussion -- I just tend to close issues by-default when answering a question, to try and manage the issue queue responsibly.)

@jamesbraza
Copy link
Contributor Author

Oh sure, this conclusion is fine with me, thanks! I realize I have been making a lot of issues here, but it's okay to close them.

For me to remove flake8, I want to make sure the rule coverage is the same. With W504 dispatched (per this issue), the last outstanding items are:

@ccostello97
Copy link

ccostello97 commented Jun 4, 2023

@charliermarsh I'd like to propose this be re-opened. Black does take the stance of W504 against line breaks after binary operators, which also aligns with the PEP-8 recommendation.

To keep my code in check with PEP-8, I have to use ruff with flake8 --select=W504. It would certainly be nice to have this encapsulated in ruff.

@Avasam
Copy link

Avasam commented Mar 4, 2024

FWIW, this would also bring Ruff autofixes closer to parity with autopep8, even if ignored/disabled by default #9057 (comment)

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

No branches or pull requests

4 participants