tests/check_new_syntax.py: check order of if statements (#6423)

This commit is contained in:
Akuli
2021-11-28 18:04:46 +02:00
committed by GitHub
parent 6d54c10387
commit 2b702233c6
4 changed files with 25 additions and 14 deletions

View File

@@ -308,7 +308,9 @@ class SSLSocket(socket.socket):
server_hostname: str | None
session: SSLSession | None
session_reused: bool | None
if sys.version_info < (3, 7):
if sys.version_info >= (3, 7):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
else:
def __init__(
self,
sock: socket.socket | None = ...,
@@ -330,8 +332,6 @@ class SSLSocket(socket.socket):
_context: SSLContext | None = ...,
_session: Any | None = ...,
) -> None: ...
else:
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def connect(self, addr: socket._Address | bytes) -> None: ...
def connect_ex(self, addr: socket._Address | bytes) -> int: ...
def recv(self, buflen: int = ..., flags: int = ...) -> bytes: ...