Enable flake8-pyi's Y037 (#9686)

This commit is contained in:
Alex Waygood
2023-02-07 03:01:02 +00:00
committed by GitHub
parent c4c4bee8aa
commit 0ef9c3f8e8
38 changed files with 119 additions and 201 deletions

View File

@@ -1,10 +1,10 @@
from collections.abc import Callable, Iterable
from typing import TypeVar, Union
from typing import TypeVar
from typing_extensions import TypeAlias
_FormatCheckCallable: TypeAlias = Callable[[object], bool]
_F = TypeVar("_F", bound=_FormatCheckCallable)
_RaisesType: TypeAlias = Union[type[Exception], tuple[type[Exception], ...]]
_RaisesType: TypeAlias = type[Exception] | tuple[type[Exception], ...]
class FormatChecker:
checkers: dict[str, tuple[_FormatCheckCallable, _RaisesType]]