File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -597,7 +597,7 @@ def _internal_class_schema(
597
597
(
598
598
type_hints [field .name ]
599
599
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 )
601
601
),
602
602
_get_field_default (field ),
603
603
field .metadata ,
@@ -1058,11 +1058,11 @@ def _get_type_hints(
1058
1058
return type_hints
1059
1059
1060
1060
1061
- def _get_generic_type_hints (
1061
+ def _get_type_hint_of_generic_object (
1062
1062
obj ,
1063
1063
schema_ctx : _SchemaContext ,
1064
1064
) -> 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."""
1066
1066
1067
1067
class X :
1068
1068
x : obj # type: ignore[name-defined]
You can’t perform that action at this time.
0 commit comments