Skip to content

Commit e75634b

Browse files
committed
chore: switch from black to ruff format
1 parent 061699b commit e75634b

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@ repos:
88
- id: end-of-file-fixer
99
- id: check-yaml
1010
- id: check-added-large-files
11-
- repo: https://github.com/psf/black
12-
rev: 22.3.0
13-
hooks:
14-
- id: black
1511
- repo: https://github.com/pre-commit/mirrors-mypy
1612
rev: v1.3.0
1713
hooks:
1814
- id: mypy
19-
- repo: https://github.com/charliermarsh/ruff-pre-commit
20-
rev: v0.0.275
15+
- repo: https://github.com/astral-sh/ruff-pre-commit
16+
rev: v0.3.3
2117
hooks:
2218
- id: ruff
19+
- id: ruff-format

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dependencies = [
4444
]
4545

4646
[project.optional-dependencies]
47-
lint = ["black ~= 23.3.0", "isort ~=5.12.0", "mypy ~= 1.3.0", "ruff ~= 0.0.275"]
47+
lint = ["mypy ~= 1.3.0", "ruff ~= 0.3.3"]
4848
compat = ["pytest-benchmark ~= 4.0.0", "pytest-xdist ~= 2.0.0"]
4949
test = ["pytest ~= 7.0", "pytest-cov ~= 4.0.0"]
5050

@@ -73,6 +73,7 @@ python_version = "3.12"
7373

7474
[tool.ruff]
7575
line-length = 88
76+
[tool.ruff.lint]
7677
select = ["E", "F", "I", "C"]
7778

7879
[tool.isort]

src/pytest_codspeed/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ def pytest_plugin_registered(plugin, manager: "pytest.PytestPluginManager"):
103103
)
104104
assert codspeed_benchmark_fixtures is not None
105105
# Archive the pytest-benchmark fixture
106-
fixture_manager._arg2fixturedefs[
107-
"__benchmark"
108-
] = fixture_manager._arg2fixturedefs["benchmark"]
106+
fixture_manager._arg2fixturedefs["__benchmark"] = (
107+
fixture_manager._arg2fixturedefs["benchmark"]
108+
)
109109
# Replace the pytest-benchmark fixture with the codspeed one
110110
fixture_manager._arg2fixturedefs["benchmark"] = codspeed_benchmark_fixtures
111111

0 commit comments

Comments
 (0)