We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db95e64 commit a494984Copy full SHA for a494984
marshmallow_dataclass/generic_resolver.py
@@ -69,8 +69,16 @@ def set_result(self, result: _U) -> None:
69
70
def is_generic_alias(clazz: type) -> bool:
71
"""
72
- Check if given class is a generic alias of a class.
73
- If a class is defined as `class A(Generic[T])`, this method will return true if `A[int]` is passed
+ Check if given object is a Generic Alias.
+
74
+ A `generic alias`__ is a generic type bound to generic parameters.
75
76
+ E.g., given
77
78
+ class A(Generic[T]):
79
+ pass
80
81
+ ``A[int]`` is a _generic alias_ (while ``A`` is a *generic type*, but not a *generic alias*).
82
83
is_generic = is_generic_type(clazz)
84
type_arguments = typing_extensions.get_args(clazz)
0 commit comments