mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
remove checks against patch versions (#987)
Both mypy and pytype only use the major and minor version in type checking. Using checks like "sys.version_info >= (3, 4, 4)" won't actually work properly for people type checking their code using version 3.4, because (3, 4) >= (3, 4, 4) will always be false (at least in mypy's approach; not sure if pytype is different).
This commit is contained in:
committed by
Guido van Rossum
parent
2dbb5f0bc3
commit
b6eec58d2c
@@ -31,7 +31,7 @@ class async_chat (asyncore.dispatcher):
|
||||
def initiate_send(self) -> None: ...
|
||||
def discard_buffers(self) -> None: ...
|
||||
|
||||
if sys.version_info < (3, 0, 0):
|
||||
if sys.version_info < (3, 0):
|
||||
class fifo:
|
||||
def __init__(self, list: Sequence[Union[str, simple_producer]] = ...) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
@@ -118,7 +118,7 @@ class MIMEPart:
|
||||
**kw: Any) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def clear_content(self) -> None: ...
|
||||
if sys.version_info >= (3, 4, 2):
|
||||
if sys.version_info >= (3, 4):
|
||||
def is_attachment(self) -> bool: ...
|
||||
else:
|
||||
@property
|
||||
|
||||
@@ -46,7 +46,6 @@ if sys.version_info >= (3, 4):
|
||||
capath: Optional[str] = ...,
|
||||
cadata: Optional[str] = ...) -> 'SSLContext': ...
|
||||
|
||||
if sys.version_info >= (3, 4, 3):
|
||||
def _create_unverified_context(protocol: int = ..., *,
|
||||
cert_reqs: int = ...,
|
||||
check_hostname: bool = ...,
|
||||
@@ -94,7 +93,6 @@ if sys.version_info >= (3, 4):
|
||||
VERIFY_CRL_CHECK_LEAF = ... # type: int
|
||||
VERIFY_CRL_CHECK_CHAIN = ... # type: int
|
||||
VERIFY_X509_STRICT = ... # type: int
|
||||
if sys.version_info >= (3, 4, 4):
|
||||
VERIFY_X509_TRUSTED_FIRST = ... # type: int
|
||||
|
||||
PROTOCOL_SSLv23 = ... # type: int
|
||||
|
||||
Reference in New Issue
Block a user