|
1 | 1 | from collections.abc import Iterable
|
2 | 2 | from typing import Any, Callable, TypeVar
|
3 | 3 |
|
4 |
| -F = TypeVar("F", bound=Callable[..., Any]) |
| 4 | +_F = TypeVar("_F", bound=Callable[..., Any]) |
5 | 5 |
|
6 | 6 | class FormatChecker:
|
7 |
| - checkers: dict[str, tuple[Callable[[Any], bool], Exception | tuple[Exception, ...],],] |
| 7 | + checkers: dict[str, tuple[Callable[[Any], bool], Exception | tuple[Exception, ...]]] |
8 | 8 |
|
9 | 9 | def __init__(self, formats: Iterable[str] | None = ...) -> None: ...
|
10 |
| - def checks(self, format: str, raises: Exception | tuple[Exception, ...] = ...) -> Callable[[F], F]: ... |
| 10 | + def checks(self, format: str, raises: Exception | tuple[Exception, ...] = ...) -> Callable[[_F], _F]: ... |
11 | 11 | @classmethod
|
12 |
| - def cls_checks(cls, format: str, raises: Exception | tuple[Exception, ...] = ...) -> Callable[[F], F]: ... |
| 12 | + def cls_checks(cls, format: str, raises: Exception | tuple[Exception, ...] = ...) -> Callable[[_F], _F]: ... |
13 | 13 | def check(self, instance: Any, format: str) -> None: ...
|
14 | 14 | def conforms(self, instance: Any, format: str) -> bool: ...
|
15 | 15 |
|
|
0 commit comments