pycodestyle icon indicating copy to clipboard operation
pycodestyle copied to clipboard

E226: 'missing whitespace' introspection issue

Open David-OConnor opened this issue 11 years ago • 11 comments

I'm getting "PEP 8: missing whitespace around arithmetic operator" introspection flag in cases where I should not, per this section of Pep 8:

"If operators with different priorities are used, consider adding whitespace around the operators with the lowest priority(ies). Use your own judgment; however, never use more than one space, and always have the same amount of whitespace on both sides of a binary operator.

Yes:

i = i + 1
submitted += 1
x = x_2 - 1
hypot2 = x_x + y*y
c = (a+b) * (a-b)"

This may be to a change in Pep 8 that this tool hasn't caught up with:

http://hg.python.org/peps/rev/37af28ad2972 http://hg.python.org/peps/rev/16dd63848921

David-OConnor avatar Dec 11 '13 18:12 David-OConnor

Duplicate #174

rohanrajpal avatar Apr 09 '23 06:04 rohanrajpal

An equivalent feature has been enabled in Svelvet 7.

Thank you for your contribution!

briangregoryholmes avatar Apr 19 '23 04:04 briangregoryholmes