Skip to content

Commit d4ef48f

Browse files
akxionelmc
authored andcommitted
Use ruff for formatting too
1 parent 5295ce0 commit d4ef48f

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg)(/|$)'
66
# Note the order is intentional to avoid multiple passes of the hooks
77
repos:
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.3.3
9+
rev: v0.4.5
1010
hooks:
1111
- id: ruff
1212
args: [--fix, --exit-non-zero-on-fix, --show-fixes, --unsafe-fixes]
13-
- repo: https://github.com/psf/black
14-
rev: 24.3.0
15-
hooks:
16-
- id: black
13+
- id: ruff-format
1714
- repo: https://github.com/pre-commit/pre-commit-hooks
1815
rev: v4.5.0
1916
hooks:

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,5 @@ inline-quotes = "single"
5252
forced-separate = ["conftest"]
5353
force-single-line = true
5454

55-
[tool.black]
56-
line-length = 140
57-
target-version = ["py38"]
58-
skip-string-normalization = true
55+
[tool.ruff.format]
56+
quote-style = "preserve"

src/pytest_cov/engine.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ class DistWorker(CovController):
361361

362362
@_ensure_topdir
363363
def start(self):
364-
365364
cleanup()
366365

367366
# Determine whether we are collocated with master.

src/pytest_cov/plugin.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ def __init__(self, options, pluginmanager, start=True, no_cov_should_warn=False)
248248
# worker is started in pytest hook
249249

250250
def start(self, controller_cls, config=None, nodeid=None):
251-
252251
if config is None:
253252
# fake config option for engine
254253
class Config:
@@ -339,7 +338,6 @@ def pytest_runtestloop(self, session):
339338
self.cov_controller.finish()
340339

341340
if not self._is_worker(session) and self._should_report():
342-
343341
# import coverage lazily here to avoid importing
344342
# it for unit tests that don't need it
345343
from coverage.misc import CoverageException

0 commit comments

Comments
 (0)