Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove --benchmark / --statistics / --count ? #1699

Open
asottile opened this issue Sep 29, 2022 · 3 comments
Open

Remove --benchmark / --statistics / --count ? #1699

asottile opened this issue Sep 29, 2022 · 3 comments

Comments

@asottile
Copy link
Member

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

@sigmavirus24
Copy link
Member

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

@asottile
Copy link
Member Author

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

@sigmavirus24
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants