Add pre-commit, ruff check configuration and Github action
#1
ruff.yml
on: pull_request
Check code with ruff
6s
Annotations
10 errors and 1 warning
|
Ruff (F401):
pyperformance/data-files/benchmarks/bm_2to3/run_benchmark.py#L20
pyperformance/data-files/benchmarks/bm_2to3/run_benchmark.py:20:16: F401 `lib2to3` imported but unused; consider using `importlib.util.find_spec` to test for availability
|
|
Ruff (F822):
pyperformance/_utils.py#L9
pyperformance/_utils.py:9:5: F822 Undefined name `run_command` in `__all__`
|
|
Ruff (F841):
pyperformance/_pyproject_toml.py#L129
pyperformance/_pyproject_toml.py:129:9: F841 Local variable `text` is assigned to but never used
|
|
Ruff (F541):
pyperformance/_pyproject_toml.py#L125
pyperformance/_pyproject_toml.py:125:30: F541 f-string without any placeholders
|
|
Ruff (F821):
pyperformance/_pyproject_toml.py#L103
pyperformance/_pyproject_toml.py:103:15: F821 Undefined name `ValuError`
|
|
Ruff (F841):
pyperformance/_manifest.py#L366
pyperformance/_manifest.py:366:9: F841 Local variable `yielded` is assigned to but never used
|
|
Ruff (F821):
pyperformance/_manifest.py#L346
pyperformance/_manifest.py:346:17: F821 Undefined name `seclines`
|
|
Ruff (F841):
pyperformance/_benchmark_metadata.py#L197
pyperformance/_benchmark_metadata.py:197:13: F841 Local variable `repo` is assigned to but never used
|
|
Ruff (F821):
pyperformance/_benchmark.py#L221
pyperformance/_benchmark.py:221:67: F821 Undefined name `NOOP`
|
|
Ruff (F822):
pyperformance/_benchmark.py#L4
pyperformance/_benchmark.py:4:5: F822 Undefined name `Benchmarkcheck_name` in `__all__`
|
|
Check code with ruff
Could not parse version from /home/runner/work/pyperformance/pyperformance/pyproject.toml. Using latest version.
|