trezor-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 09:16:06 -07:00
class __dummy:
2017-06-12 09:16:06 -07:00
def __getitem__(self, *args):
return object
2017-06-13 10:35:14 -07:00
__t = __dummy()
for __n in __names_get:
globals()[__n] = __t
for __n in __names_obj:
globals()[__n] = object
2017-06-12 09:16:06 -07:00
def TypeVar(*args):
return object
2017-06-12 09:16:06 -07:00
def NewType(*args):
2016-09-13 02:24:12 -07:00
return lambda x: x
2017-06-13 10:35:14 -07:00
TYPE_CHECKING = False