From 8f35ea74dad754cb194fafb11eab16db02825ba2 Mon Sep 17 00:00:00 2001 From: Jonathan Ehwald Date: Tue, 24 Dec 2024 03:30:42 +0100 Subject: [PATCH] Remove now unnecessary type casts --- strawberry/utils/typing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strawberry/utils/typing.py b/strawberry/utils/typing.py index e06a7f72a2..1a9ad36126 100644 --- a/strawberry/utils/typing.py +++ b/strawberry/utils/typing.py @@ -257,7 +257,7 @@ def _get_namespace_from_ast( and expr.value.id == "Union" ): if hasattr(ast, "Index") and isinstance(expr.slice, ast.Index): - expr_slice = cast(Any, expr.slice).value + expr_slice = expr.slice.value else: expr_slice = expr.slice @@ -275,7 +275,7 @@ def _get_namespace_from_ast( and expr.value.id == "Annotated" ): if hasattr(ast, "Index") and isinstance(expr.slice, ast.Index): - expr_slice = cast(Any, expr.slice).value + expr_slice = expr.slice.value else: expr_slice = expr.slice