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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.12.12"
rev: "v0.13.0"
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -23,7 +23,7 @@ repos:
language: python
additional_dependencies: [pygments, restructuredtext_lint]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.17.1
rev: v1.18.1
hooks:
- id: mypy
files: ^(src/|testing/)
Expand Down
2 changes: 1 addition & 1 deletion src/xdist/dsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def get_workers_status_line(
# All workers collect the same number of items, so we grab
# the total number of items from the first worker.
first = status_and_items[0]
status, tests_collected = first
_status, tests_collected = first
tests_noun = "item" if tests_collected == 1 else "items"
return f"{total_workers} {workers_noun} [{tests_collected} {tests_noun}]"
if WorkerStatus.CollectionDone in statuses:
Expand Down
2 changes: 1 addition & 1 deletion src/xdist/looponfail.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def loop_once(self) -> None:
self.setup()
self.wasfailing = self.failures and len(self.failures)
result = self.runsession()
failures, reports, collection_failed = result
failures, _reports, collection_failed = result
if collection_failed:
pass # "Collection failed, keeping previous failure set"
else:
Expand Down
2 changes: 1 addition & 1 deletion src/xdist/scheduler/loadscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def schedule(self) -> None:
self.log(f"Shutting down {extra_nodes} nodes")

for _ in range(extra_nodes):
unused_node, assigned = self.assigned_work.popitem()
unused_node, _assigned = self.assigned_work.popitem()

self.log(f"Shutting down unused node {unused_node}")
unused_node.shutdown()
Expand Down
6 changes: 3 additions & 3 deletions testing/test_looponfail.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_nofailures(self, pytester: pytest.Pytester) -> None:
item = pytester.getitem("def test_func(): pass\n")
control = RemoteControl(item.config)
control.setup()
topdir, failures = control.runsession()[:2]
_topdir, failures = control.runsession()[:2]
assert not failures

def test_failures_somewhere(self, pytester: pytest.Pytester) -> None:
Expand All @@ -128,7 +128,7 @@ def test_failures_somewhere(self, pytester: pytest.Pytester) -> None:
control.setup()
item.path.write_text("def test_func():\n assert 1\n")
removepyc(item.path)
topdir, failures = control.runsession()[:2]
_topdir, failures = control.runsession()[:2]
assert not failures

def test_failure_change(self, pytester: pytest.Pytester) -> None:
Expand Down Expand Up @@ -218,7 +218,7 @@ def test_func():
)
control = RemoteControl(item.config)
control.setup()
topdir, failures = control.runsession()[:2]
_topdir, failures = control.runsession()[:2]
assert not failures


Expand Down
2 changes: 1 addition & 1 deletion testing/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def test_process_from_remote_error_handling(
worker.use_callback = True
worker.setup()
worker.slp.process_from_remote(("<nonono>", {}))
out, err = capsys.readouterr()
out, _err = capsys.readouterr()
assert "INTERNALERROR> ValueError: unknown event: <nonono>" in out
ev = worker.popevent()
assert ev.name == "errordown"
Expand Down
Loading