Skip to content

STYLE: Fix linting of benchmarks #22884

Closed
@datapythonista

Description

@datapythonista

We are currently not linting (validating PEP-8) of the benchmarks in asv_bench/benchmarks. But it'd be good to start doing it as with the rest of the code.

Before starting the automatic validation, we need to fix all the style problems. Those can be obtained by executing flake8 --config=none asv_bench/benchmarks --ignore=F811,E731

This is currently returning:

asv_bench/benchmarks/algorithms.py:12:5: E722 do not use bare except'
asv_bench/benchmarks/timeseries.py:1:1: F401 'warnings' imported but unused
asv_bench/benchmarks/stat_ops.py:21:9: E722 do not use bare except'
asv_bench/benchmarks/stat_ops.py:59:9: E722 do not use bare except'
asv_bench/benchmarks/pandas_vb_common.py:5:1: F401 'pandas.Panel' imported but unused
asv_bench/benchmarks/pandas_vb_common.py:12:5: E722 do not use bare except'
asv_bench/benchmarks/pandas_vb_common.py:37:9: E722 do not use bare except'
asv_bench/benchmarks/join_merge.py:32:9: E722 do not use bare except'
asv_bench/benchmarks/io/csv.py:2:1: F401 'timeit' imported but unused
asv_bench/benchmarks/io/csv.py:8:1: F401 'pandas.compat.PY2' imported but unused
asv_bench/benchmarks/io/csv.py:184:80: E501 line too long (87 > 79 characters)

All them should be fixed. Most of them should be immediate to fix, but for E722 do not use bare except make sure the specific exception is captured, and don't simply use except Exception:.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BenchmarkPerformance (ASV) benchmarksCIContinuous IntegrationCode StyleCode style, linting, code_checksgood first issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions