From fff2b10e04ebb86f826d3b1e475be39de91f349c Mon Sep 17 00:00:00 2001 From: "ahsan.sheraz" Date: Wed, 11 Mar 2026 16:11:33 +0100 Subject: [PATCH] Fix pre-commit formatting and test coverage - Collapse _try_resolve_annotated signature to one line (ruff format) - Add pragma: no cover to dep() stubs that are never called during tests Made-with: Cursor --- tests/test_annotated_forward_ref.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_annotated_forward_ref.py b/tests/test_annotated_forward_ref.py index 80cc2d9949..1413d35ca3 100644 --- a/tests/test_annotated_forward_ref.py +++ b/tests/test_annotated_forward_ref.py @@ -73,7 +73,7 @@ def test_try_resolve_strict_success(): """Fully resolvable annotation returns immediately via strict eval.""" def dep() -> str: - return "ok" + return "ok" # pragma: no cover ns = {"Annotated": Annotated, "str": str, "Depends": Depends, "dep": dep} result = _try_resolve_annotated("Annotated[str, Depends(dep)]", ns) @@ -90,7 +90,7 @@ def test_try_resolve_lenient_with_depends(): """Unresolvable type + Depends → Annotated[Any, Depends(...)].""" def dep() -> str: - return "ok" + return "ok" # pragma: no cover ns = {"Annotated": Annotated, "Depends": Depends, "dep": dep} result = _try_resolve_annotated("Annotated[MissingClass, Depends(dep)]", ns) @@ -146,7 +146,7 @@ def test_get_typed_annotation_annotated_with_result(): """Annotated string that resolves via _try_resolve_annotated.""" def dep() -> str: - return "ok" + return "ok" # pragma: no cover ns = {"Annotated": Annotated, "str": str, "Depends": Depends, "dep": dep} result = get_typed_annotation("Annotated[str, Depends(dep)]", ns)