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.54k stars 291 forks source link

Account for whitespace-only separation of flake8 error selectors/ignores #708

Open PeterJCLaw opened 9 months ago

PeterJCLaw commented 9 months ago

It appears that flake8 allows for ignored errors in an ignore section to be whitespace separated, without the need for commas. Autopep8 however doesn't seem to allow for this -- configs which only have whitespace separation result in none of the requested error types being ignored, nor an error about invalid config.

Python Code

print("foo")
import os  # E402

Command Line and Configuration

[flake8]
ignore =
    C401
    E402

Command Line

$ autopep8

Your Environment