You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider this input, which has two lines of whitespace above the function
q=1defx(y, z):
if (
yandz
):
pass
autopep8 will not touch it (this is good, this is what I expect)
However if it has more line breaks at the top this happens:
q = 1
--
def x(y, z):
if (
- y and- z+ y+ and z
):
pass
I don't think autopep8 should be rewriting W504 / W503 unless asked to and especially not when fixing an unrelated issue. pycodestyle and flake8 by default turns those warnings off
$ .tox/py36/bin/autopep8 noop.py --ignore=E501 --verbose
[file:t.py]
---> Applying global fix for E265
---> 1 issue(s) to fix {'W504': {6}}
---> 1 issue(s) to fix {'W503': {7}}
q = 1
def x(y, z):
if (
y and
z
):
pass
$ .tox/py36/bin/autopep8 t.py --ignore=E501 --verbose
[file:t.py]
---> Applying global fix for E265
---> 2 issue(s) to fix {'E303': {5}, 'W504': {7}}
---> 1 issue(s) to fix {'W503': {7}}
---> 1 issue(s) to fix {'W504': {6}}
q = 1
def x(y, z):
if (
y
and z
):
pass
I suspect the "fix" here is that if the ignore does not handle the conflicting options, autopep8 should ignore the conflicting options
Consider this input, which has two lines of whitespace above the function
autopep8
will not touch it (this is good, this is what I expect)However if it has more line breaks at the top this happens:
I don't think autopep8 should be rewriting W504 / W503 unless asked to and especially not when fixing an unrelated issue. pycodestyle and flake8 by default turns those warnings off
The text was updated successfully, but these errors were encountered: