flake8
flake8 copied to clipboard
Remove --benchmark / --statistics / --count ?
describe the request
did some quick profiling, flake8 -j1
spends about 5% of its time collecting these (even if they're not selected).
I also feel like these are not that useful and could probably be derived in a separate formatter if desired? I don't think I've ever used them but I've definitely broken them a few times.
what say to removing these options? (and perhaps providing a third party formatter
for them as a middle-ground?)
this would also "trivially" solve #1458
Statistics is quite helpful when onboarding flake8 to a new project because you can get the count of problems and decide the low hanging fruit versus the more time-intensive problems that go into extend-ignore
(assuming an auto-formatter doesn't catch the violations).
Perhaps if there was something that could suggest configuration based on existing violation frequency etc that would be more valuable
fwiw it seems --statistics
can be gotten pretty easily with something like:
$ flake8 Lib/test/test_tools/ | awk '{print $2}' | sort | uniq -c | sort -rn
30 E128
10 E302
4 F841
3 E265
3 E231
2 E501
2 E251
2 E124
1 F401
1 E401
1 E306
1 E131
I think if we ship an extension to replace them that is probably acceptable. I suspect regardless of the number of jobs we're spending too much time on these for what is likely the benefit of very few users