Fix miscellaneous invalid TypeVar usages (#8074)

This commit is contained in:
Alex Waygood
2022-06-14 16:48:41 +01:00
committed by GitHub
parent 4941ac0263
commit 01d5e28ff7
7 changed files with 36 additions and 19 deletions

View File

@@ -46,9 +46,10 @@ class Mailbox(Generic[_MessageT]):
_path: bytes | str # undocumented
_factory: Callable[[IO[Any]], _MessageT] | None # undocumented
def __init__(
self, path: StrOrBytesPath, factory: Callable[[IO[Any]], _MessageT] | None = ..., create: bool = ...
) -> None: ...
@overload
def __init__(self, path: StrOrBytesPath, factory: Callable[[IO[Any]], _MessageT], create: bool = ...) -> None: ...
@overload
def __init__(self, path: StrOrBytesPath, factory: None = ..., create: bool = ...) -> None: ...
@abstractmethod
def add(self, message: _MessageData) -> str: ...
@abstractmethod