Add mypy error codes to type: ignores, remove unused ignores (#7504)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Alex Waygood
2022-03-19 13:10:00 +00:00
committed by GitHub
parent 4308915e06
commit 340c6c97ed
67 changed files with 159 additions and 150 deletions

View File

@@ -9,8 +9,7 @@ class SMTPChannel(asynchat.async_chat):
COMMAND: int
DATA: int
def __init__(self, server: SMTPServer, conn: socket.socket, addr: Any, data_size_limit: int = ...) -> None: ...
# base asynchat.async_chat.push() accepts bytes
def push(self, msg: Text) -> None: ... # type: ignore
def push(self, msg: Text) -> None: ...
def collect_incoming_data(self, data: bytes) -> None: ...
def found_terminator(self) -> None: ...
def smtp_HELO(self, arg: str) -> None: ...
@@ -35,11 +34,7 @@ class SMTPServer(asyncore.dispatcher):
class DebuggingServer(SMTPServer): ...
class PureProxy(SMTPServer):
def process_message( # type: ignore
self, peer: _Address, mailfrom: str, rcpttos: list[Text], data: bytes | str
) -> str | None: ...
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[Text], data: bytes | str) -> str | None: ... # type: ignore[override]
class MailmanProxy(PureProxy):
def process_message( # type: ignore
self, peer: _Address, mailfrom: str, rcpttos: list[Text], data: bytes | str
) -> str | None: ...
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[Text], data: bytes | str) -> str | None: ... # type: ignore[override]