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

Question: autopep8 output #289

Open snakescott opened 7 years ago

snakescott commented 7 years ago

Is there a way for get autopep8 --in-place to pycodestyle-ish output like optparse.py:69:11: E401 multiple imports on one line, so that you can see what errors were found/fixed?

If not, would a Pull Request for this functionality be welcome?

Thanks!

snakescott commented 7 years ago

I'm aware of --verbose but find the above example more readable than autopep8's verbose output, which when I run, looks like

--->  Applying global fix for E265
--->  Applying global fix for W602
--->  44 issue(s) to fix {u'E121': set([106, 13]), 'E261': set([24]), 'E501': set([131, 138, 139, 13, 143, 145, 146, 160, 176, 34, 36, 39, 40, 42, 171, 178, 48, 50, 180, 201, 58, 60, 61, 63, 192, 195, 199, 72, 73, 77, 78, 85, 88, 89, 92, 186, 167, 108, 114, 122, 170])}
--->  25 issue(s) to fix {u'E127': set([97]), u'E128': set([93]), u'E121': set([118]), 'E501': set([13, 152, 158, 34, 92, 42, 45, 177, 51, 184, 187, 62, 64, 65, 194, 67, 199, 83, 212, 220, 102, 119])}
--->  22 issue(s) to fix {u'E121': set([120]), 'E501': set([64, 65, 34, 67, 195, 200, 188, 42, 83, 13, 45, 178, 51, 213, 185, 120, 153, 92, 221, 62, 159])}
--->  21 issue(s) to fix {'E501': set([64, 65, 34, 67, 195, 200, 188, 42, 83, 13, 45, 178, 51, 213, 185, 120, 153, 92, 221, 62, 159])}