foo = (
"""\
Short
Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long
Short
""" # noqa: E501
)
There is no flake8 error because the E501 error is ignored:
$ flake8 example.py
$
Run YAPF, this changes the file:
$ yapf --in-place example.py
$ cat example.py
foo = (
"""\
Short
Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long
Short
"""
# noqa: E501
)
flake8 now does not ignore the error:
$ flake8 example.py
example.py:4:80: E501 line too long (88 > 79 characters)
It is possible to make a file with a
# noqa
comment which disables aflake8
error, which YAPF will move so that the comment is no longer useful.Install dependencies:
Create
example.py
with the following contents:There is no
flake8
error because theE501
error is ignored:Run YAPF, this changes the file:
flake8
now does not ignore the error: