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
$
W503 is incompatible with PEP 8. See https://github.com/ambv/black/pull/36 for details. We need to document this.
In fact, let's reopen this as a documentation issue.
@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?
Most helpful comment
@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?