hhatto / autopep8

A tool that automatically formats Python code to conform to the PEP 8 style guide.
https://pypi.org/project/autopep8/
MIT License
4.56k stars 290 forks source link

E126 not fixed when prior line contains noqa statement #648

Closed spaceone closed 5 months ago

spaceone commented 2 years ago

Python Code

from foo import (  # noqa: E402
        bar, baz, blub
)

does not fix the 8 space over indentation (E126) as it's only detected by flake8 but not by pycodestyle.

See also https://github.com/PyCQA/pycodestyle/issues/1097.

hhatto commented 5 months ago

autopep8 makes modifications based on the results of pycodestyle. It will not respond to those that pycodestyle cannot detect.