Skip to content

Commit

Permalink
chore: switch from black to ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
art049 committed Mar 19, 2024
1 parent 969f3ad commit bb28e9f
Showing 3 changed files with 8 additions and 10 deletions.
9 changes: 3 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -8,15 +8,12 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
hooks:
- id: mypy
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.275
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.3
hooks:
- id: ruff
- id: ruff-format
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ dependencies = [
]

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

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

[tool.ruff]
line-length = 88
[tool.ruff.lint]
select = ["E", "F", "I", "C"]

[tool.isort]
6 changes: 3 additions & 3 deletions src/pytest_codspeed/plugin.py
Original file line number Diff line number Diff line change
@@ -101,9 +101,9 @@ def pytest_plugin_registered(plugin, manager: "pytest.PytestPluginManager"):
)
assert codspeed_benchmark_fixtures is not None
# Archive the pytest-benchmark fixture
fixture_manager._arg2fixturedefs[
"__benchmark"
] = fixture_manager._arg2fixturedefs["benchmark"]
fixture_manager._arg2fixturedefs["__benchmark"] = (
fixture_manager._arg2fixturedefs["benchmark"]
)
# Replace the pytest-benchmark fixture with the codspeed one
fixture_manager._arg2fixturedefs["benchmark"] = codspeed_benchmark_fixtures

0 comments on commit bb28e9f

Please # to comment.