Skip to content

Commit

Permalink
Remove now unnecessary type casts
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorJohn committed Dec 24, 2024
1 parent cccdd81 commit 2c6944d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions strawberry/utils/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 2c6944d

Please sign in to comment.