-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
Description
Example:
import typing
from pytypes import type_util
Container = typing.Union[
typing.List['Data'],
]
Data = typing.Union[
Container,
str, bytes, bool, float, int, dict,
]
type_util._issubclass(typing.List[float], Container)
Traceback (most recent call last):
File "<redacted>/lib/python3.6/site-packages/pytypes/type_util.py", line 1387, in _issubclass_2
return issubclass(subclass, superclass)
TypeError: Forward references cannot be used with issubclass().
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 14, in <module>
type_util._issubclass(typing.List[float], Container)
TypeError: Invalid type declaration: float, _ForwardRef('Data')