You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/core/src/typing.py

22 lines
396 B

TYPE_CHECKING = False
class _GenericTypingObject:
def __init__(self, *args, **kwargs):
pass
def __getattr__(self, key):
# property access: P.kwargs
return object
def __getitem__(self, key):
# dict-like access: Generic[T], Generic[K, V]
return self
_TYPING_OBJECT = _GenericTypingObject()
def __getattr__(key):
return _TYPING_OBJECT