Backport many Self-related changes to the Python-2 stdlib (#7128)

This commit is contained in:
Alex Waygood
2022-02-04 18:10:05 +00:00
committed by GitHub
parent 57b2bae031
commit 51cdd2c6be
19 changed files with 37 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
import socket
import sys
from _typeshed import StrPath
from _typeshed import Self, StrPath
from typing import Any, Callable, ClassVar, Iterable, NamedTuple, Optional, Text, Union, overload
from typing_extensions import Literal
@@ -213,7 +213,7 @@ class SSLSocket(socket.socket):
class SSLContext:
check_hostname: bool
options: int
def __new__(cls, protocol: int, *args: Any, **kwargs: Any) -> SSLContext: ...
def __new__(cls: type[Self], protocol: int, *args: Any, **kwargs: Any) -> Self: ...
@property
def protocol(self) -> int: ...
verify_flags: int