mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-21 18:42:07 +08:00
Remove Python 3.6 branches from typeshed (#8269)
This commit is contained in:
143
stdlib/types.pyi
143
stdlib/types.pyi
@@ -41,17 +41,13 @@ __all__ = [
|
||||
"DynamicClassAttribute",
|
||||
"coroutine",
|
||||
"BuiltinMethodType",
|
||||
"ClassMethodDescriptorType",
|
||||
"MethodDescriptorType",
|
||||
"MethodWrapperType",
|
||||
"WrapperDescriptorType",
|
||||
"resolve_bases",
|
||||
]
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
__all__ += [
|
||||
"ClassMethodDescriptorType",
|
||||
"MethodDescriptorType",
|
||||
"MethodWrapperType",
|
||||
"WrapperDescriptorType",
|
||||
"resolve_bases",
|
||||
]
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
__all__ += ["CellType"]
|
||||
|
||||
@@ -407,9 +403,8 @@ class CoroutineType(Coroutine[_T_co, _T_contra, _V_co]):
|
||||
def cr_frame(self) -> FrameType: ...
|
||||
@property
|
||||
def cr_running(self) -> bool: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
@property
|
||||
def cr_origin(self) -> tuple[tuple[str, int, str], ...] | None: ...
|
||||
@property
|
||||
def cr_origin(self) -> tuple[tuple[str, int, str], ...] | None: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
@property
|
||||
def cr_suspended(self) -> bool: ...
|
||||
@@ -465,62 +460,57 @@ class BuiltinFunctionType:
|
||||
|
||||
BuiltinMethodType = BuiltinFunctionType
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
@final
|
||||
class WrapperDescriptorType:
|
||||
@property
|
||||
def __name__(self) -> str: ...
|
||||
@property
|
||||
def __qualname__(self) -> str: ...
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __get__(self, __obj: Any, __type: type = ...) -> Any: ...
|
||||
@final
|
||||
class WrapperDescriptorType:
|
||||
@property
|
||||
def __name__(self) -> str: ...
|
||||
@property
|
||||
def __qualname__(self) -> str: ...
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __get__(self, __obj: Any, __type: type = ...) -> Any: ...
|
||||
|
||||
@final
|
||||
class MethodWrapperType:
|
||||
@property
|
||||
def __self__(self) -> object: ...
|
||||
@property
|
||||
def __name__(self) -> str: ...
|
||||
@property
|
||||
def __qualname__(self) -> str: ...
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __eq__(self, __other: object) -> bool: ...
|
||||
def __ne__(self, __other: object) -> bool: ...
|
||||
@final
|
||||
class MethodWrapperType:
|
||||
@property
|
||||
def __self__(self) -> object: ...
|
||||
@property
|
||||
def __name__(self) -> str: ...
|
||||
@property
|
||||
def __qualname__(self) -> str: ...
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __eq__(self, __other: object) -> bool: ...
|
||||
def __ne__(self, __other: object) -> bool: ...
|
||||
|
||||
@final
|
||||
class MethodDescriptorType:
|
||||
@property
|
||||
def __name__(self) -> str: ...
|
||||
@property
|
||||
def __qualname__(self) -> str: ...
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __get__(self, obj: Any, type: type = ...) -> Any: ...
|
||||
@final
|
||||
class MethodDescriptorType:
|
||||
@property
|
||||
def __name__(self) -> str: ...
|
||||
@property
|
||||
def __qualname__(self) -> str: ...
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __get__(self, obj: Any, type: type = ...) -> Any: ...
|
||||
|
||||
@final
|
||||
class ClassMethodDescriptorType:
|
||||
@property
|
||||
def __name__(self) -> str: ...
|
||||
@property
|
||||
def __qualname__(self) -> str: ...
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __get__(self, obj: Any, type: type = ...) -> Any: ...
|
||||
@final
|
||||
class ClassMethodDescriptorType:
|
||||
@property
|
||||
def __name__(self) -> str: ...
|
||||
@property
|
||||
def __qualname__(self) -> str: ...
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __get__(self, obj: Any, type: type = ...) -> Any: ...
|
||||
|
||||
@final
|
||||
class TracebackType:
|
||||
if sys.version_info >= (3, 7):
|
||||
def __init__(self, tb_next: TracebackType | None, tb_frame: FrameType, tb_lasti: int, tb_lineno: int) -> None: ...
|
||||
tb_next: TracebackType | None
|
||||
else:
|
||||
@property
|
||||
def tb_next(self) -> TracebackType | None: ...
|
||||
def __init__(self, tb_next: TracebackType | None, tb_frame: FrameType, tb_lasti: int, tb_lineno: int) -> None: ...
|
||||
tb_next: TracebackType | None
|
||||
# the rest are read-only even in 3.7
|
||||
@property
|
||||
def tb_frame(self) -> FrameType: ...
|
||||
@@ -549,9 +539,8 @@ class FrameType:
|
||||
@property
|
||||
def f_locals(self) -> dict[str, Any]: ...
|
||||
f_trace: Callable[[FrameType, str, Any], Any] | None
|
||||
if sys.version_info >= (3, 7):
|
||||
f_trace_lines: bool
|
||||
f_trace_opcodes: bool
|
||||
f_trace_lines: bool
|
||||
f_trace_opcodes: bool
|
||||
def clear(self) -> None: ...
|
||||
|
||||
@final
|
||||
@@ -578,23 +567,13 @@ class MemberDescriptorType:
|
||||
def __set__(self, __instance: Any, __value: Any) -> None: ...
|
||||
def __delete__(self, __obj: Any) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def new_class(
|
||||
name: str,
|
||||
bases: Iterable[object] = ...,
|
||||
kwds: dict[str, Any] | None = ...,
|
||||
exec_body: Callable[[dict[str, Any]], object] | None = ...,
|
||||
) -> type: ...
|
||||
def resolve_bases(bases: Iterable[object]) -> tuple[Any, ...]: ...
|
||||
|
||||
else:
|
||||
def new_class(
|
||||
name: str,
|
||||
bases: tuple[type, ...] = ...,
|
||||
kwds: dict[str, Any] | None = ...,
|
||||
exec_body: Callable[[dict[str, Any]], object] | None = ...,
|
||||
) -> type: ...
|
||||
|
||||
def new_class(
|
||||
name: str,
|
||||
bases: Iterable[object] = ...,
|
||||
kwds: dict[str, Any] | None = ...,
|
||||
exec_body: Callable[[dict[str, Any]], object] | None = ...,
|
||||
) -> type: ...
|
||||
def resolve_bases(bases: Iterable[object]) -> tuple[Any, ...]: ...
|
||||
def prepare_class(
|
||||
name: str, bases: tuple[type, ...] = ..., kwds: dict[str, Any] | None = ...
|
||||
) -> tuple[type, dict[str, Any], dict[str, Any]]: ...
|
||||
|
||||
Reference in New Issue
Block a user