mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Fix various __all__ bugs and omissions (#7618)
This commit is contained in:
@@ -30,6 +30,56 @@ from typing import ( # noqa: Y022,Y027
|
||||
overload as overload,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"ClassVar",
|
||||
"Concatenate",
|
||||
"Final",
|
||||
"LiteralString",
|
||||
"ParamSpec",
|
||||
"Self",
|
||||
"Type",
|
||||
"TypeVarTuple",
|
||||
"Unpack",
|
||||
"Awaitable",
|
||||
"AsyncIterator",
|
||||
"AsyncIterable",
|
||||
"Coroutine",
|
||||
"AsyncGenerator",
|
||||
"AsyncContextManager",
|
||||
"ChainMap",
|
||||
"ContextManager",
|
||||
"Counter",
|
||||
"Deque",
|
||||
"DefaultDict",
|
||||
"OrderedDict",
|
||||
"TypedDict",
|
||||
"SupportsIndex",
|
||||
"Annotated",
|
||||
"assert_never",
|
||||
"dataclass_transform",
|
||||
"final",
|
||||
"IntVar",
|
||||
"is_typeddict",
|
||||
"Literal",
|
||||
"NewType",
|
||||
"overload",
|
||||
"Protocol",
|
||||
"reveal_type",
|
||||
"runtime",
|
||||
"runtime_checkable",
|
||||
"Text",
|
||||
"TypeAlias",
|
||||
"TypeGuard",
|
||||
"TYPE_CHECKING",
|
||||
"Never",
|
||||
"NoReturn",
|
||||
"Required",
|
||||
"NotRequired",
|
||||
"get_args",
|
||||
"get_origin",
|
||||
"get_type_hints",
|
||||
]
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_F = TypeVar("_F", bound=Callable[..., Any])
|
||||
_TC = TypeVar("_TC", bound=Type[object])
|
||||
@@ -82,15 +132,14 @@ TypedDict: object
|
||||
|
||||
OrderedDict = _Alias()
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def get_type_hints(
|
||||
obj: Callable[..., Any],
|
||||
globalns: dict[str, Any] | None = ...,
|
||||
localns: dict[str, Any] | None = ...,
|
||||
include_extras: bool = ...,
|
||||
) -> dict[str, Any]: ...
|
||||
def get_args(tp: Any) -> tuple[Any, ...]: ...
|
||||
def get_origin(tp: Any) -> Any | None: ...
|
||||
def get_type_hints(
|
||||
obj: Callable[..., Any],
|
||||
globalns: dict[str, Any] | None = ...,
|
||||
localns: dict[str, Any] | None = ...,
|
||||
include_extras: bool = ...,
|
||||
) -> dict[str, Any]: ...
|
||||
def get_args(tp: Any) -> tuple[Any, ...]: ...
|
||||
def get_origin(tp: Any) -> Any | None: ...
|
||||
|
||||
Annotated: _SpecialForm
|
||||
_AnnotatedAlias: Any # undocumented
|
||||
|
||||
Reference in New Issue
Block a user