Closed schodge closed 10 years ago
Thanks for this, is a merge conflict already! (but will add in). I definitely need to reconsider the messages displayed, any thoughts on what would be the ideal ?
How about this:
Applying autopep8 to touched lines in 1 file(s)
1/1: Applying pep8radius to btyfi.py on lines:
112-93, 91-72, 5-1,
Pep8radius complete, better than you found it!
That looks good, though the backward ordering of the line groups and lines took me a moment to figure out. (How did I generate a merge conflict? I only added 5 lines...)
My code, of course, took the easy way out and just counted the file list you were supposed to work on; I'm not sure how errors get handled raised in autopep8, if it fails on a file, is there a way for btyfi to know about it?
@schodge I think there's a verbosity setting on autopep8... It's extremely noisy! merge conflict was weird, as it was before I pushed the big change!
@schodge ah cripes you mean like syntax errors... they seem to be ignored i.e. don't raise in autopep8 (but do return the set of remaining infractions which can include sytax errors like bad indentation E113). Great point.
Perhaps the solution here is call autopep8 from the module rather than shell out. That way we can probably print/do something if there are remaining infractions (not looked into this but looks like they are stored as a set of infractions to line numbers)... ?
We call the autopep8 module and pass a load of options to it. We use the verbose settings of autopep8 (one less):
pep8radius -v -v -v
is like calling
autopep8 -v -v
Considering pushing as point release.
Added a file counter to indicate how many files were done. Feel free to remove or require verbose.