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 shouldn't exist #494

Closed
asottile opened this issue Apr 3, 2021 · 2 comments
Closed

W503 shouldn't exist #494

asottile opened this issue Apr 3, 2021 · 2 comments

Comments

@asottile
Copy link
Member

asottile commented Apr 3, 2021

In GitLab by @gitaarik on May 23, 2016, 11:11

Python version: Python 2.7.11+
flake8 installed using: pip
pip version: 8.1.2
setuptools version: 17.1.1
flake8 version:
2.5.4 (pep8: 1.7.0, mccabe: 0.4.0, pyflakes: 1.0.0) CPython 2.7.11+ on Linux

Error W503 shouldn't exist, it complains about line breaks before binary operators, but according to PEP8 it shouldn't matter as long as you keep it consistent in the project:
https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator

So instead of flake8 showing a warning for this, it shouldn't.

I'm manually disabling this now in the ~/.config/flake8 with:

[flake8]
ignore=W503
@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @sigmavirus24 on May 23, 2016, 13:31

This particular check is implemented in pycodestyle (formerly pep8) and has been disabled. That said, the text of the PEP used to insist on a line break after a binary operator instead of before. It was recently updated and the subject of discussion on:

Either way, until pycodestyle is satisfied with PR 502 and other PRs that are open for the next release, you'll have to continue ignoring W503.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @marbu on Oct 31, 2018, 14:56

mentioned in commit mbukatov/pylatest@728c835

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant