Skip to content

Commit c7a3c46

Browse files
committed
Added types from the types module
1 parent 4f14340 commit c7a3c46

1 file changed

Lines changed: 31 additions & 3 deletions

File tree

python_utils/types.py

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import decimal
44
from typing_extensions import * # type: ignore # pragma: no cover # noqa: F403
55
from typing import * # type: ignore # pragma: no cover # noqa: F403
6+
from types import * # type: ignore # pragma: no cover # noqa: F403
67

78
# import * does not import these in all Python versions
89
from typing import Pattern, BinaryIO, IO, TextIO, Match
@@ -55,13 +56,15 @@
5556
'SupportsIndex',
5657
'Optional',
5758
'ParamSpec',
59+
'ParamSpecArgs',
60+
'ParamSpecKwargs',
5861
'Protocol',
5962
'Tuple',
6063
'Type',
6164
'TypeVar',
6265
'Union',
6366
# ABCs (from collections.abc).
64-
'AbstractSet', # collections.abc.Set.
67+
'AbstractSet',
6568
'ByteString',
6669
'Container',
6770
'ContextManager',
@@ -126,11 +129,36 @@
126129
'no_type_check_decorator',
127130
'NoReturn',
128131
'overload',
129-
'ParamSpecArgs',
130-
'ParamSpecKwargs',
131132
'runtime_checkable',
132133
'Text',
133134
'TYPE_CHECKING',
134135
'TypeAlias',
135136
'TypeGuard',
137+
'TracebackType',
138+
# Types from the `types` module.
139+
'FunctionType',
140+
'LambdaType',
141+
'CodeType',
142+
'MappingProxyType',
143+
'SimpleNamespace',
144+
'GeneratorType',
145+
'CoroutineType',
146+
'AsyncGeneratorType',
147+
'MethodType',
148+
'BuiltinFunctionType',
149+
'BuiltinMethodType',
150+
'WrapperDescriptorType',
151+
'MethodWrapperType',
152+
'MethodDescriptorType',
153+
'ClassMethodDescriptorType',
154+
'ModuleType',
155+
'TracebackType',
156+
'FrameType',
157+
'GetSetDescriptorType',
158+
'MemberDescriptorType',
159+
'new_class',
160+
'resolve_bases',
161+
'prepare_class',
162+
'DynamicClassAttribute',
163+
'coroutine',
136164
]

0 commit comments

Comments
 (0)