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

W503 reported only after E203 is ignored #965

Closed
fuglede opened this issue Oct 9, 2020 · 2 comments
Closed

W503 reported only after E203 is ignored #965

fuglede opened this issue Oct 9, 2020 · 2 comments

Comments

@fuglede
Copy link

fuglede commented Oct 9, 2020

Consider the following simple file, let's call it test.py:

a = (
    2
    + 2
)

That is, something one might expect to find after running black. Here, pycodestyle test.py reports no errors. Now, ignore E203 (which is also common in the context of black), and we get the following output:

$ pycodestyle test.py --ignore E203
test.py:3:5: W503 line break before binary operator

This is on pycodestyle 2.6.0.

@asottile
Copy link
Member

asottile commented Oct 9, 2020

hopefully this part of the docs helps explain what you're seeing: https://github.com/PyCQA/pycodestyle/blame/a1b1f7c795ace4c186fd76ec6df994deb716cea8/docs/intro.rst#L434-L435

if you're using flake8 instead I'd suggest extend-ignore which preserves the default ignore list

@asottile asottile closed this as completed Oct 9, 2020
@fuglede
Copy link
Author

fuglede commented Oct 9, 2020

Yep, indeed it does; thanks!

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

No branches or pull requests

2 participants