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)})"