Skip to content

Commit 6769f77

Browse files
committed
WIP
1 parent d4ac1a0 commit 6769f77

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

strawberry/types/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __class_getitem__(cls, types: Union[type, tuple[type, ...]]) -> type[Info]:
7878
https://discuss.python.org/t/passing-only-one-typevar-of-two-when-using-defaults/49134
7979
"""
8080
if not isinstance(types, tuple):
81-
types = (types, Any) # type: ignore
81+
types = (types, Any)
8282

8383
return super().__class_getitem__(types) # type: ignore
8484

strawberry/utils/typing.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,7 @@ def is_concrete_generic(annotation: type) -> bool:
130130

131131

132132
def is_generic_subclass(annotation: type) -> bool:
133-
return isinstance(annotation, type) and issubclass(
134-
annotation,
135-
Generic, # type:ignore
136-
)
133+
return isinstance(annotation, type) and issubclass(annotation, Generic)
137134

138135

139136
def is_generic(annotation: type) -> bool:
@@ -185,7 +182,7 @@ def get_parameters(annotation: type) -> Union[tuple[object], tuple[()]]:
185182
and issubclass(annotation, Generic) # type:ignore
186183
and annotation is not Generic
187184
):
188-
return annotation.__parameters__ # type: ignore[union-attr]
185+
return annotation.__parameters__
189186
return () # pragma: no cover
190187

191188

0 commit comments

Comments
 (0)