Skip to content

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

Open

Description

@asottile

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

Activity

  1. sigmavirus24 commented on Sep 29, 2022

    @sigmavirus24
    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

  2. asottile commented on Sep 29, 2022

    @asottile
    MemberAuthor

    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
  3. sigmavirus24 commented on Oct 3, 2022

    @sigmavirus24
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions