Fix some errors with --disallow-any-generics (#3276)

See #3267. Covers all of stdlib/2and3.
This commit is contained in:
Guido van Rossum
2019-09-29 09:15:27 -07:00
committed by GitHub
parent 1e881ad156
commit b336182b69
27 changed files with 85 additions and 92 deletions

View File

@@ -44,7 +44,7 @@ class IMAP4:
def recent(self) -> CommandResults: ...
def response(self, code: str) -> CommandResults: ...
def append(self, mailbox: str, flags: str, date_time: str, message: str) -> str: ...
def authenticate(self, mechanism: str, authobject: Callable) -> Tuple[str, str]: ...
def authenticate(self, mechanism: str, authobject: Callable[[bytes], Optional[bytes]]) -> Tuple[str, str]: ...
def capability(self) -> CommandResults: ...
def check(self) -> CommandResults: ...
def close(self) -> CommandResults: ...
@@ -111,7 +111,7 @@ class IMAP4_stream(IMAP4):
port: int = ...
sock: _socket = ...
file: IO[Any] = ...
process: subprocess.Popen = ...
process: subprocess.Popen[bytes] = ...
writefile: IO[Any] = ...
readfile: IO[Any] = ...
def open(self, host: str = ..., port: Optional[int] = ...) -> None: ...
@@ -121,8 +121,8 @@ class IMAP4_stream(IMAP4):
def shutdown(self) -> None: ...
class _Authenticator:
mech: Callable = ...
def __init__(self, mechinst: Callable) -> None: ...
mech: Callable[[bytes], bytes] = ...
def __init__(self, mechinst: Callable[[bytes], bytes]) -> None: ...
def process(self, data: str) -> str: ...
def encode(self, inp: bytes) -> str: ...
def decode(self, inp: str) -> bytes: ...