From 5564fe1750bf68f68dd908f1a8bcb40f638b7a5e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 00:36:51 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- test_attach_logger_error_no_misleading_warning.py | 4 +++- test_llama_seq_class_hook_call_passes_false.py | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/test_attach_logger_error_no_misleading_warning.py b/test_attach_logger_error_no_misleading_warning.py index 03f482abe2..536dd39dd3 100644 --- a/test_attach_logger_error_no_misleading_warning.py +++ b/test_attach_logger_error_no_misleading_warning.py @@ -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, diff --git a/test_llama_seq_class_hook_call_passes_false.py b/test_llama_seq_class_hook_call_passes_false.py index a4252b46b9..8fb1438200 100644 --- a/test_llama_seq_class_hook_call_passes_false.py +++ b/test_llama_seq_class_hook_call_passes_false.py @@ -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)})"