Skip to content

Commit 7d17d71

Browse files
authored
Remove all ruff ignore except E501 (#406)
1 parent 90b438b commit 7d17d71

File tree

6 files changed

+7
-16
lines changed

6 files changed

+7
-16
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1+
exclude: ^pyperformance/data-files/
12
repos:
23
- repo: https://github.com/astral-sh/ruff-pre-commit
34
rev: v0.12.11
45
hooks:
56
- id: ruff-check
67
name: Run Ruff (lint)
78
args: [--exit-non-zero-on-fix]
8-
exclude: ^pyperformance/data-files/
99

1010
- repo: https://github.com/tox-dev/pyproject-fmt
1111
rev: v2.6.0
1212
hooks:
1313
- id: pyproject-fmt
14-
exclude: ^pyperformance/data-files/
1514

1615
- repo: https://github.com/abravalheri/validate-pyproject
1716
rev: v0.24.1
1817
hooks:
1918
- id: validate-pyproject
20-
exclude: ^pyperformance/data-files/
21-

pyperformance/_manifest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ def _parse_benchmarks_section(lines):
313313
version = origin = None
314314
for line in lines:
315315
try:
316-
name, metafile = (None if l == '-' else l
317-
for l in line.split('\t'))
316+
name, metafile = (None if field == '-' else field
317+
for field in line.split('\t'))
318318
except ValueError:
319319
raise ValueError(f'bad benchmark line {line!r}')
320320
spec = _benchmark.BenchmarkSpec(name or None, version, origin)

pyperformance/_utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import os.path
2525
import shlex
2626
import shutil
27+
import subprocess
28+
import sys
2729
import tempfile
2830
import urllib.request
2931

@@ -81,9 +83,6 @@ def safe_rmtree(path):
8183
#######################################
8284
# platform utils
8385

84-
import subprocess
85-
import sys
86-
8786

8887
MS_WINDOWS = (sys.platform == 'win32')
8988

pyperformance/_venv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def parse_venv_config(lines, root=None):
4343
if isinstance(lines, str):
4444
lines = lines.splitlines()
4545
else:
46-
lines = (l.rstrip(os.linesep) for l in lines)
46+
lines = (line.rstrip(os.linesep) for line in lines)
4747

4848
cfg = types.SimpleNamespace(
4949
home=None,

pyperformance/tests/test_venv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def render_venv_config(cfg):
4747
lines.append(f'executable = {cfg.executable}')
4848
if cfg.command is not None:
4949
lines.append(f'command = {cfg.command}')
50-
return ''.join(l + os.linesep for l in lines)
50+
return ''.join(line + os.linesep for line in lines)
5151

5252

5353
class VenvConfigTests(tests.Functional, unittest.TestCase):

pyproject.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,7 @@ lint.select = [
102102
"F", # pyflakes errors
103103
]
104104
lint.ignore = [
105-
"E402", # module level import not at top of file
106105
"E501", # line too long
107-
"E701", # multiple statements on one line (colon)
108-
"E722", # do not use bare 'except'
109-
"E741", # ambiguous variable name
110-
"F405", # name may be undefined, or defined from star imports
111106
]
112107

113108
[tool.pyproject-fmt]

0 commit comments

Comments
 (0)