Skip to content

Commit db95e64

Browse files
committed
Rename function to be more descriptive
1 parent b3362ba commit db95e64

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

marshmallow_dataclass/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ def _internal_class_schema(
597597
(
598598
type_hints[field.name]
599599
if not is_generic_type(clazz)
600-
else _get_generic_type_hints(field.type, schema_ctx)
600+
else _get_type_hint_of_generic_object(field.type, schema_ctx)
601601
),
602602
_get_field_default(field),
603603
field.metadata,
@@ -1058,11 +1058,11 @@ def _get_type_hints(
10581058
return type_hints
10591059

10601060

1061-
def _get_generic_type_hints(
1061+
def _get_type_hint_of_generic_object(
10621062
obj,
10631063
schema_ctx: _SchemaContext,
10641064
) -> type:
1065-
"""typing.get_type_hints doesn't work with generic aliases. But this 'hack' works."""
1065+
"""typing.get_type_hints doesn't work with generic aliases, i.e.: A[int]. But this 'hack' works."""
10661066

10671067
class X:
10681068
x: obj # type: ignore[name-defined]

0 commit comments

Comments
 (0)