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

Does flake8 still ignore W503 by default? #2925

Open
ichard26 opened this issue Mar 15, 2022 · 3 comments
Open

Does flake8 still ignore W503 by default? #2925

ichard26 opened this issue Mar 15, 2022 · 3 comments
Labels
good first issue T: documentation

Comments

@ichard26
Copy link
Collaborator

@ichard26 ichard26 commented Mar 15, 2022

Suspect regression. Using v 4.0.1 (Gentoo X86_64). Having just installed black (v22.1.0), reformatting produced multiple W503 messages. Attempted to utilize extended-ignore and reloaded/rescanned project. Warnings persisted. I ensured no W503/W504 ignores were present in code or configuration. Only after adding explicitly W503 to extended-ignore would flake8 be satisfied.

Originally posted by @scottfurry in #1661 (comment)

@ichard26 ichard26 added good first issue T: documentation labels Mar 15, 2022
@ichard26
Copy link
Collaborator Author

@ichard26 ichard26 commented Mar 15, 2022

I can't reproduce this behaviour but I'm no flake8 pro. If it turns out flake8 requires ignoring W503 line break before binary operator then let's add it back to the compatible configuration docs (don't forget to explain why it should be ignored like the others!)

@JelleZijlstra
Copy link
Collaborator

@JelleZijlstra JelleZijlstra commented Mar 15, 2022

I feel like it's better to err on the side of listing more codes in our docs, just in case people explicitly turn on the code or flake8 changes its mind about defaults.

@jpy-git
Copy link
Contributor

@jpy-git jpy-git commented Mar 16, 2022

it's still in the default ignores for the latest flake8 (flake8 --help)
image

my guess is they might have used --ignore in one of their configs to try and ignore another error rather than --extend-ignore and overwritten the default list, hence why they then need to re-add it in.
image

The black docs already have a warning against enabling W503 and the above flake8 behaviour is in their documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue T: documentation
Projects
None yet
Development

No branches or pull requests

3 participants