pycodestyle icon indicating copy to clipboard operation
pycodestyle copied to clipboard

W503: % is not considered to be a binary operator for line breaks

Open FichteFoll opened this issue 10 years ago • 15 comments

print("%s"
      % "text")

does not emit W503.

The % operator is shown in the example for https://www.python.org/dev/peps/pep-0008/#multiline-if-statements, so it can be assumed that this is a recommendation, yet it is excluded from the bin-op check.

Even though I hate this convention and do not follow it, this is inconsistent. Might want to consider adding this as a separate error code because this has been such a longstanding issue?

FichteFoll avatar Jul 15 '15 22:07 FichteFoll