1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00
trezor-firmware/core/mocks/typing.py

70 lines
970 B
Python
Raw Normal View History

__names_get = [
'AbstractSet',
'AsyncIterable',
'AsyncIterator',
'Awaitable',
'ByteString',
'Callable',
'Container',
'DefaultDict',
'Dict',
'Generator',
'Generic',
'ItemsView',
'Iterable',
'Iterator',
'KeysView',
'List',
'Mapping',
'MappingView',
'MutableMapping',
'MutableSequence',
'MutableSet',
'Optional',
'Reversible',
'Sequence',
'Set',
'Tuple',
'Type',
'Union',
'ValuesView',
]
__names_obj = [
'Any',
'AnyStr',
'Hashable',
'Sized',
'SupportsAbs',
'SupportsFloat',
'SupportsInt',
'SupportsRound',
'Text',
]
2017-06-12 16:16:06 +00:00
class __dummy:
2017-06-12 16:16:06 +00:00
def __getitem__(self, *args):
return object
2017-06-13 17:35:14 +00:00
__t = __dummy()
for __n in __names_get:
globals()[__n] = __t
for __n in __names_obj:
globals()[__n] = object
2017-06-12 16:16:06 +00:00
def TypeVar(*args):
return object
2017-06-12 16:16:06 +00:00
def NewType(*args):
2016-09-13 09:24:12 +00:00
return lambda x: x
2017-06-13 17:35:14 +00:00
TYPE_CHECKING = False