Skip to content

--benchmark / --statistics don't play well with custom formatters or --quiet #1458

Open
@asottile

Description

@asottile

while moving things around, I noticed that these options don't play nicely with formatters

for example:

$ flake8 --quiet --quiet t.py --statistics
1     F401 'os' imported but unused
$ flake8 --format=json --benchmark t.py; echo
{"t.py": [{"code": "F401", "filename": "t.py", "line_number": 1, "column_number": 1, "text": "'os' imported but unused", "physical_line": "import os\n"}]0.00914    seconds elapsed1          total logical lines processed109        logical lines processed per second1          total physical lines processed109        physical lines processed per second3          total tokens processed328        tokens processed per second1          total files processed109        files processed per second}

I think ideally the following happens: statistics / benchmarks are moved from the base formatter to the default formatter and are noops otherwise

perhaps even removing statistics / benchmark if they're not deemed useful enough

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