Black: [Critical] Black violates pep8 (E203)

Created on 1 Oct 2018  路  2Comments  路  Source: psf/black

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]]

Most helpful comment

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

All 2 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

devxpy picture devxpy  路  70Comments

altendky picture altendky  路  41Comments

stefanoborini picture stefanoborini  路  54Comments

spapanik picture spapanik  路  23Comments

bofm picture bofm  路  72Comments