mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-07 02:10:59 +08:00
Remove Python 3.6 branches from typeshed (#8269)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user