mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 13:38:12 +00:00
chore(core): add fake typing module (not included in build)
This commit is contained in:
parent
1bfaec10e9
commit
9c5945a888
18
core/src/typing.py
Normal file
18
core/src/typing.py
Normal file
@ -0,0 +1,18 @@
|
||||
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
|
Loading…
Reference in New Issue
Block a user