Fix several mypy errors when run on the 3.11 stdlib (#7389)

This commit is contained in:
Alex Waygood
2022-02-27 01:49:36 +00:00
committed by GitHub
parent 95df201a78
commit 2d6ab4d3bf
3 changed files with 29 additions and 48 deletions

View File

@@ -1710,7 +1710,7 @@ if sys.version_info >= (3, 10):
class EncodingWarning(Warning): ...
if sys.version_info >= (3, 11):
_SplitCondition = type[BaseException] | tuple[type[BaseException], ...] | Callable[[BaseException], bool]
_SplitCondition = Union[type[BaseException], tuple[type[BaseException], ...], Callable[[BaseException], bool]]
class BaseExceptionGroup(BaseException):
def __new__(cls: type[Self], __message: str, __exceptions: Sequence[BaseException]) -> Self: ...