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

Document that W503 generated by pycodestyle is not PEP 8-compliant #52

Closed
dusty-phillips opened this issue Mar 21, 2018 · 3 comments
Closed
Assignees
Labels
good first issue Good for newcomers T: documentation Improvements to the docs (e.g. new topic, correction, etc)

Comments

@dusty-phillips
Copy link

dusty-phillips commented Mar 21, 2018

Not sure if feature or bug.

 $ black --version
black, version 18.3a3
 $ flake8 --version
3.5.0 (mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.6.0) CPython 3.6.2 on Linux
 $ cat test.py
def meh(eh):
    if ("a" not in eh or ("b" not in eh and "c" not in eh and "d" not in eh) or "e" not in eh):
        return True
 $ black .    
reformatted test.py
 $ cat test.py
def meh(eh):
    if (
        "a" not in eh
        or ("b" not in eh and "c" not in eh and "d" not in eh)
        or "e" not in eh
    ):
        return True
 $ flake8 --select=W
./test.py:4:9: W503 line break before binary operator
./test.py:5:9: W503 line break before binary operator
 $ 
@ambv
Copy link
Collaborator

ambv commented Mar 21, 2018

W503 is incompatible with PEP 8. See #36 for details. We need to document this.

@ambv ambv closed this as completed Mar 21, 2018
@ambv ambv changed the title Black creates W503 in flake8 Document that W503 generated by pycodestyle is not PEP 8-compliant Mar 21, 2018
@ambv
Copy link
Collaborator

ambv commented Mar 21, 2018

In fact, let's reopen this as a documentation issue.

@ambv ambv reopened this Mar 21, 2018
@ambv ambv added good first issue Good for newcomers T: documentation Improvements to the docs (e.g. new topic, correction, etc) labels Mar 21, 2018
@dusty-phillips
Copy link
Author

@ambv Weird, I thought I checked the black .flake8 and the W503 wasn't excluded, only it is.

How about a black option to generate a default black-compatible .flake8 file?

@autophagy autophagy self-assigned this Apr 6, 2018
@ambv ambv closed this as completed Apr 6, 2018
tony added a commit to tmux-python/tmuxp that referenced this issue Aug 25, 2018
draabe added a commit to floodlight-sports/floodlight that referenced this issue Feb 3, 2023
draabe added a commit to floodlight-sports/floodlight that referenced this issue Feb 3, 2023
* feat: add discretized voronoi model

* test: tests for discretized voronoi model

* docs: documentation for discretized voronoi model

* test: mark plotting tests as such

* fix: exclude W503 from flake (see psf/black#52)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers T: documentation Improvements to the docs (e.g. new topic, correction, etc)
Projects
None yet
Development

No branches or pull requests

3 participants