[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-04-21 00:36:51 +00:00
parent 78e2ece54c
commit 5564fe1750
2 changed files with 9 additions and 7 deletions

View file

@ -65,7 +65,9 @@ class _FakeMod:
return iter([])
def test_successful_dispatch_does_not_emit_misleading_warning_when_logger_raises(monkeypatch):
def test_successful_dispatch_does_not_emit_misleading_warning_when_logger_raises(
monkeypatch,
):
"""When dispatch_model succeeds but the user's logger.info raises
(broken handler / strict test harness), the helper must NOT emit the
'Could not attach multi-device dispatch hooks automatically' warning,

View file

@ -60,11 +60,11 @@ def test_seq_class_branch_passes_fast_inference_false():
for body_node in if_node.body:
hook_calls.extend(_collect_hook_calls_under(body_node))
assert hook_calls, (
"No _attach_bnb_multidevice_hooks call found under `if num_labels is not None:`"
)
assert (
hook_calls
), "No _attach_bnb_multidevice_hooks call found under `if num_labels is not None:`"
for call in hook_calls:
v = _kwarg_literal(call, "fast_inference")
assert v is False, (
f"seq-class hook call must use fast_inference=False (got {ast.dump(call)})"
)
assert (
v is False
), f"seq-class hook call must use fast_inference=False (got {ast.dump(call)})"