Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
exclude: ^pyperformance/data-files/
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.11
hooks:
- id: ruff-check
name: Run Ruff (lint)
args: [--exit-non-zero-on-fix]
exclude: ^pyperformance/data-files/

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.6.0
hooks:
- id: pyproject-fmt
exclude: ^pyperformance/data-files/

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24.1
hooks:
- id: validate-pyproject
exclude: ^pyperformance/data-files/

4 changes: 2 additions & 2 deletions pyperformance/_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ def _parse_benchmarks_section(lines):
version = origin = None
for line in lines:
try:
name, metafile = (None if l == '-' else l
for l in line.split('\t'))
name, metafile = (None if field == '-' else field
for field in line.split('\t'))
except ValueError:
raise ValueError(f'bad benchmark line {line!r}')
spec = _benchmark.BenchmarkSpec(name or None, version, origin)
Expand Down
5 changes: 2 additions & 3 deletions pyperformance/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import os.path
import shlex
import shutil
import subprocess
import sys
import tempfile
import urllib.request

Expand Down Expand Up @@ -81,9 +83,6 @@ def safe_rmtree(path):
#######################################
# platform utils

import subprocess
import sys


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

Expand Down
2 changes: 1 addition & 1 deletion pyperformance/_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def parse_venv_config(lines, root=None):
if isinstance(lines, str):
lines = lines.splitlines()
else:
lines = (l.rstrip(os.linesep) for l in lines)
lines = (line.rstrip(os.linesep) for line in lines)

cfg = types.SimpleNamespace(
home=None,
Expand Down
2 changes: 1 addition & 1 deletion pyperformance/tests/test_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def render_venv_config(cfg):
lines.append(f'executable = {cfg.executable}')
if cfg.command is not None:
lines.append(f'command = {cfg.command}')
return ''.join(l + os.linesep for l in lines)
return ''.join(line + os.linesep for line in lines)


class VenvConfigTests(tests.Functional, unittest.TestCase):
Expand Down
5 changes: 0 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,7 @@ lint.select = [
"F", # pyflakes errors
]
lint.ignore = [
"E402", # module level import not at top of file
"E501", # line too long
"E701", # multiple statements on one line (colon)
"E722", # do not use bare 'except'
"E741", # ambiguous variable name
"F405", # name may be undefined, or defined from star imports
]

[tool.pyproject-fmt]
Expand Down
Loading