use fixed_type logic
This commit is contained in:
parent
777e8bc60e
commit
75ef7737be
@ -68,9 +68,7 @@ class ObjectVar(ImmutableVar[OBJECT_TYPE]):
|
|||||||
Returns:
|
Returns:
|
||||||
The type of the values of the object.
|
The type of the values of the object.
|
||||||
"""
|
"""
|
||||||
fixed_type = (
|
fixed_type = get_origin(self._var_type) or self._var_type
|
||||||
self._var_type if isclass(self._var_type) else get_origin(self._var_type)
|
|
||||||
)
|
|
||||||
if not isclass(fixed_type):
|
if not isclass(fixed_type):
|
||||||
return Any
|
return Any
|
||||||
args = get_args(self._var_type) if issubclass(fixed_type, dict) else ()
|
args = get_args(self._var_type) if issubclass(fixed_type, dict) else ()
|
||||||
|
Loading…
Reference in New Issue
Block a user