Closed hayd closed 10 years ago
autopep8 has a diff argument. We could print the sum of that in a nice way... noting that we already have a parser.
Perhaps should say:
1/3 file.py: 0 lines fixed.
2/3 file2.py: 1 lines fixed.
@@ -2919,7 +2919,7 @@
- if not logical[0]:
+ if not logical[0]:
3/3 file3.py: 0 lines fixed.
pep8radius fixed 2 lines in 3 files.
This is significantly better than the line ranges backwards (which is an implementation detail).
Not sure if should show entire diff or not (removing the 3 lines above and before seems less noisy) ?
Strangely autopep8.fix_file(f, self.options)
isn't returning the diff (it seems to in the interpreter, when options.diff=True
).
For the moment it's showing dots for each pass, until I can extract the diff.
fixed
passes options to autopep8 now, much better
related to #13, if there are no pep8 violations maybe it should say so / print less. Or say the number of changes made in each / over all line range:
Not sure.