Skip to content

Commit a494984

Browse files
committed
Improved doc string
1 parent db95e64 commit a494984

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

marshmallow_dataclass/generic_resolver.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,16 @@ def set_result(self, result: _U) -> None:
6969

7070
def is_generic_alias(clazz: type) -> bool:
7171
"""
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
72+
Check if given object is a Generic Alias.
73+
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*).
7482
"""
7583
is_generic = is_generic_type(clazz)
7684
type_arguments = typing_extensions.get_args(clazz)

0 commit comments

Comments
 (0)