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

Whitespaces inserted when using ``--ignore=E402`` #672

Open mateipa opened 1 year ago

mateipa commented 1 year ago
$ echo "x*2 + 1" | autopep8 -
x*2 + 1

$ echo "x*2 + 1" | autopep8 --ignore=E402 -
x * 2 + 1

E402 is related to top-level imports only but not to whitespaces.

Your Environment

nbaju1 commented 1 year ago

This happens when you add any ignore (at least the 10+ random ones I tested) like this.