Use mypy from git for stdlib stubtest (#12016)

This commit is contained in:
Alex Waygood
2024-05-23 13:08:18 -04:00
committed by GitHub
parent c11fc20651
commit 4bc70e1e4d
5 changed files with 14 additions and 170 deletions

View File

@@ -1844,11 +1844,11 @@ class BaseException:
__traceback__: TracebackType | None
def __init__(self, *args: object) -> None: ...
def __setstate__(self, state: dict[str, Any] | None, /) -> None: ...
def with_traceback(self, object: TracebackType | None, /) -> Self: ...
def with_traceback(self, tb: TracebackType | None, /) -> Self: ...
if sys.version_info >= (3, 11):
# only present after add_note() is called
__notes__: list[str]
def add_note(self, object: str, /) -> None: ...
def add_note(self, note: str, /) -> None: ...
class GeneratorExit(BaseException): ...
class KeyboardInterrupt(BaseException): ...
@@ -2008,7 +2008,7 @@ if sys.version_info >= (3, 11):
def exceptions(self) -> tuple[_BaseExceptionT_co | BaseExceptionGroup[_BaseExceptionT_co], ...]: ...
@overload
def subgroup(
self, object: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
self, condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
) -> ExceptionGroup[_ExceptionT] | None: ...
@overload
def subgroup(
@@ -2020,7 +2020,7 @@ if sys.version_info >= (3, 11):
) -> BaseExceptionGroup[_BaseExceptionT_co] | None: ...
@overload
def split(
self, object: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
self, condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
) -> tuple[ExceptionGroup[_ExceptionT] | None, BaseExceptionGroup[_BaseExceptionT_co] | None]: ...
@overload
def split(
@@ -2032,10 +2032,10 @@ if sys.version_info >= (3, 11):
) -> tuple[BaseExceptionGroup[_BaseExceptionT_co] | None, BaseExceptionGroup[_BaseExceptionT_co] | None]: ...
# In reality it is `NonEmptySequence`:
@overload
def derive(self, object: Sequence[_ExceptionT], /) -> ExceptionGroup[_ExceptionT]: ...
def derive(self, excs: Sequence[_ExceptionT], /) -> ExceptionGroup[_ExceptionT]: ...
@overload
def derive(self, excs: Sequence[_BaseExceptionT], /) -> BaseExceptionGroup[_BaseExceptionT]: ...
def __class_getitem__(cls, object: Any, /) -> GenericAlias: ...
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
class ExceptionGroup(BaseExceptionGroup[_ExceptionT_co], Exception):
def __new__(cls, message: str, exceptions: Sequence[_ExceptionT_co], /) -> Self: ...