1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-10-19 06:19:27 +00:00
trezor-firmware/core/src/typing.py
grdddj 9fc5bb546b style(core): full pyright-based type-checking
Changes many fields to required -- as far as we were able to figure out,
signing would fail if these fields aren't provided anyway, so this
should not pose a compatibility problem.

Co-authored-by: matejcik <ja@matejcik.cz>
2022-01-07 21:41:17 +01:00

22 lines
396 B
Python

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