Remove Python 3.6 branches from typeshed (#8269)

This commit is contained in:
Alex Waygood
2022-07-11 09:55:17 +01:00
committed by GitHub
parent 29c17ffb47
commit edc0ecd857
114 changed files with 1016 additions and 2642 deletions

View File

@@ -1,4 +1,4 @@
import sys
from enum import Enum
from typing_extensions import TypeAlias
# Because UUID has properties called int and bytes we need to rename these temporarily.
@@ -6,40 +6,25 @@ _Int: TypeAlias = int
_Bytes: TypeAlias = bytes
_FieldsType: TypeAlias = tuple[int, int, int, int, int, int]
if sys.version_info >= (3, 7):
from enum import Enum
class SafeUUID(Enum):
safe: int
unsafe: int
unknown: None
class SafeUUID(Enum):
safe: int
unsafe: int
unknown: None
class UUID:
if sys.version_info >= (3, 7):
def __init__(
self,
hex: str | None = ...,
bytes: _Bytes | None = ...,
bytes_le: _Bytes | None = ...,
fields: _FieldsType | None = ...,
int: _Int | None = ...,
version: _Int | None = ...,
*,
is_safe: SafeUUID = ...,
) -> None: ...
@property
def is_safe(self) -> SafeUUID: ...
else:
def __init__(
self,
hex: str | None = ...,
bytes: _Bytes | None = ...,
bytes_le: _Bytes | None = ...,
fields: _FieldsType | None = ...,
int: _Int | None = ...,
version: _Int | None = ...,
) -> None: ...
def __init__(
self,
hex: str | None = ...,
bytes: _Bytes | None = ...,
bytes_le: _Bytes | None = ...,
fields: _FieldsType | None = ...,
int: _Int | None = ...,
version: _Int | None = ...,
*,
is_safe: SafeUUID = ...,
) -> None: ...
@property
def is_safe(self) -> SafeUUID: ...
@property
def bytes(self) -> _Bytes: ...
@property