-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Incorrectly adds space in slice #1859
Comments
There is no end to this torment of E203 bug reports ... :D A duplicate of #1841, #1701, #1563, #1541, #1448, #1437, #1413, #1343, #1332, #1323, #1029, #889, #785, #565, #544, #492, #403, #354, #350, #311, #279, #264, and #227... Since I honestly don't care about these issues anymore, imma copy and paste what's in our docs (emphasis mine):
https://black.readthedocs.io/en/stable/the_black_code_style.html#slices Have a good day! At this point it's just plain funny (minus the notification)! |
Sorry, I didn't search for E203. :( |
…pace The issue is controversial and discussed in psf/black#1859 (comment) psf/black#311
…pace The issue is controversial and discussed in psf/black#1859 (comment) psf/black#311
…pace The issue is controversial and discussed in psf/black#1859 (comment) psf/black#311
…pace The issue is controversial and discussed in psf/black#1859 (comment) psf/black#311
https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#slices
For |
The expected behavior now is |
For our future-selves, adding: [flake8]
ignore = E203 to |
@drorata Note You may want to use |
- "Subarrays with Product Less than a Target"
Describe the bug
Black adds a space before the colon in a string slice with no upper bound
To Reproduce
when run on black with no arguments produces
Expected behavior A clear and concise description of what you expected to happen.
The correct behavior would be to output
Environment (please complete the following information):
Does this bug also happen on master? To answer this, you have two options:
Yes
Additional context Add any other context about the problem here.
flake8 and PyCharm both report "E203 whitespace before ':'" with Black's current output
The correct behavior is inferred from this example from the pep8 document
ham[1:9:]
I'm currently working around this with # fmt: off since our files have to pass flake8.
The text was updated successfully, but these errors were encountered: