Add mypy error codes to '# type: ignore' comments (#6379)

This commit is contained in:
Akuli
2021-11-26 08:07:56 +02:00
committed by GitHub
parent 1278fa86e2
commit a5bc1e037f
74 changed files with 218 additions and 202 deletions

View File

@@ -570,9 +570,9 @@ class socket(_socket.socket):
) -> BinaryIO: ...
def sendfile(self, file: BinaryIO, offset: int = ..., count: int | None = ...) -> int: ...
@property
def family(self) -> AddressFamily: ... # type: ignore
def family(self) -> AddressFamily: ... # type: ignore[override]
@property
def type(self) -> SocketKind: ... # type: ignore
def type(self) -> SocketKind: ... # type: ignore[override]
def get_inheritable(self) -> bool: ...
def set_inheritable(self, inheritable: bool) -> None: ...
@@ -593,7 +593,7 @@ if sys.platform == "win32":
def socketpair(family: int = ..., type: int = ..., proto: int = ...) -> tuple[socket, socket]: ...
else:
def socketpair( # type: ignore
def socketpair(
family: int | AddressFamily | None = ..., type: SocketType | int = ..., proto: int = ...
) -> tuple[socket, socket]: ...