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

[Critical] Black violates pep8 (E203) #544

Closed
DhiaTN opened this issue Oct 1, 2018 · 2 comments
Closed

[Critical] Black violates pep8 (E203) #544

DhiaTN opened this issue Oct 1, 2018 · 2 comments

Comments

@DhiaTN
Copy link

DhiaTN commented Oct 1, 2018

Operating system: MacOS
Python version: 3.6
Black version: 18.9b0
Does also happen on master: yes

Black is violating pep8 rules while formatting, it's introducing spaces in list slices:

x/api.py:28:47: E203 whitespace before ':'
y/api.py:28:52: E203 whitespace before ':'
2     E203 whitespace before ':'
  • Original code:
    l = [i.name for i in x[_offset: _offset + _limit]]

  • Transformed code:
    l = [i.name for i in x[_offset : _offset + _limit]]

@DhiaTN DhiaTN changed the title Black violates E203, [Critical] Black violates pep8 (E203) Oct 1, 2018
@cas--
Copy link
Contributor

cas-- commented Oct 1, 2018

I believe this is correct for slicing:

See #280 and PyCQA/pycodestyle#373

@JelleZijlstra
Copy link
Collaborator

Indeed. This is also documented in https://github.com/ambv/black#slices.

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

No branches or pull requests

3 participants