Operating system:
Python version: 3.6
Black version: 18.6b1
Does also happen on master: yes
Create a file with
tup = nsamples, nalleless[i : i + size], i, size
and black won't correct the white spaces around :.
pep8 is wrong here. Quoting black's README: "This behaviour may raise E203 whitespace before ':' warnings in style guide enforcement tools like Flake8. Since E203 is not PEP 8 compliant, you should tell Flake8 to ignore these warnings."
In general when using black it's safe to disable formatting-related errors in tools like flake8; black takes care of the styling minutiae for you.
Thanks a lot, @JelleZijlstra !
Most helpful comment
pep8 is wrong here. Quoting black's README: "This behaviour may raise E203 whitespace before ':' warnings in style guide enforcement tools like Flake8. Since E203 is not PEP 8 compliant, you should tell Flake8 to ignore these warnings."
In general when using black it's safe to disable formatting-related errors in tools like flake8; black takes care of the styling minutiae for you.