mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
@@ -31,7 +31,7 @@ from _typeshed import (
|
||||
)
|
||||
from collections.abc import Awaitable, Callable, Iterable, Iterator, MutableSet, Reversible, Set as AbstractSet, Sized
|
||||
from io import BufferedRandom, BufferedReader, BufferedWriter, FileIO, TextIOWrapper
|
||||
from types import CodeType, TracebackType, _Cell
|
||||
from types import CellType, CodeType, TracebackType
|
||||
|
||||
# mypy crashes if any of {ByteString, Sequence, MutableSequence, Mapping, MutableMapping} are imported from collections.abc in builtins.pyi
|
||||
from typing import ( # noqa: Y022
|
||||
@@ -951,7 +951,7 @@ class tuple(Sequence[_T_co]):
|
||||
class function:
|
||||
# Make sure this class definition stays roughly in line with `types.FunctionType`
|
||||
@property
|
||||
def __closure__(self) -> tuple[_Cell, ...] | None: ...
|
||||
def __closure__(self) -> tuple[CellType, ...] | None: ...
|
||||
__code__: CodeType
|
||||
__defaults__: tuple[Any, ...] | None
|
||||
__dict__: dict[str, Any]
|
||||
@@ -1333,7 +1333,7 @@ if sys.version_info >= (3, 11):
|
||||
locals: Mapping[str, object] | None = None,
|
||||
/,
|
||||
*,
|
||||
closure: tuple[_Cell, ...] | None = None,
|
||||
closure: tuple[CellType, ...] | None = None,
|
||||
) -> None: ...
|
||||
|
||||
else:
|
||||
@@ -1794,7 +1794,7 @@ def __import__(
|
||||
fromlist: Sequence[str] = (),
|
||||
level: int = 0,
|
||||
) -> types.ModuleType: ...
|
||||
def __build_class__(func: Callable[[], _Cell | Any], name: str, /, *bases: Any, metaclass: Any = ..., **kwds: Any) -> Any: ...
|
||||
def __build_class__(func: Callable[[], CellType | Any], name: str, /, *bases: Any, metaclass: Any = ..., **kwds: Any) -> Any: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
from types import EllipsisType
|
||||
|
||||
Reference in New Issue
Block a user