mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Update python 2 UUID stubs (#922)
This commit is contained in:
committed by
Guido van Rossum
parent
7a211921dd
commit
65b45282f4
@@ -1,23 +1,44 @@
|
||||
from typing import NamedTuple, Any, Tuple
|
||||
from typing import Any, Tuple, Optional
|
||||
|
||||
_int_type = int
|
||||
|
||||
class _UUIDFields(NamedTuple('_UUIDFields',
|
||||
[('time_low', int), ('time_mid', int), ('time_hi_version', int), ('clock_seq_hi_variant', int), ('clock_seq_low', int), ('node', int)])):
|
||||
time = ... # type: int
|
||||
clock_seq = ... # type: int
|
||||
_int = int
|
||||
|
||||
class UUID:
|
||||
def __init__(self, hex: str = ..., bytes: str = ..., bytes_le: str = ...,
|
||||
fields: Tuple[int, int, int, int, int, int] = ..., int: int = ..., version: Any = ...) -> None: ...
|
||||
def __init__(self, hex: Optional[str] = ..., bytes: Optional[str] = ...,
|
||||
bytes_le: Optional[str] = ...,
|
||||
fields: Optional[Tuple[int, int, int, int, int, int]] = ...,
|
||||
int: Optional[int] = ...,
|
||||
version: Optional[int] = ...) -> None: ...
|
||||
int = ... # type: _int
|
||||
def get_bytes(self) -> _int: ...
|
||||
bytes = ... # type: str
|
||||
def get_bytes_le(self) -> str: ...
|
||||
bytes_le = ... # type: str
|
||||
fields = ... # type: _UUIDFields
|
||||
def get_fields(self) -> Tuple[_int, _int, _int, _int, _int, _int]: ...
|
||||
fields = ... # type: Tuple[_int, _int, _int, _int, _int, _int]
|
||||
def get_time_low(self) -> _int: ...
|
||||
time_low = ... # type: _int
|
||||
def get_time_mid(self) -> _int: ...
|
||||
time_mid = ... # type: _int
|
||||
def get_time_hi_version(self) -> _int: ...
|
||||
time_hi_version = ... # type: _int
|
||||
def get_clock_seq_hi_variant(self) -> _int: ...
|
||||
clock_seq_hi_variant = ... # type: _int
|
||||
def get_clock_seq_low(self) -> _int: ...
|
||||
clock_seq_low = ... # type: _int
|
||||
def get_time(self) -> _int: ...
|
||||
time = ... # type: _int
|
||||
def get_clock_seq(self) -> _int: ...
|
||||
clock_seq = ... # type: _int
|
||||
def get_node(self) -> _int: ...
|
||||
node = ... # type: _int
|
||||
def get_hex(self) -> str: ...
|
||||
hex = ... # type: str
|
||||
int = ... # type: _int_type
|
||||
def get_urn(self) -> str: ...
|
||||
urn = ... # type: str
|
||||
variant = ... # type: _int_type
|
||||
version = ... # type: _int_type
|
||||
def get_variant(self) -> _int: ...
|
||||
variant = ... # type: _int
|
||||
def get_version(self) -> _int: ...
|
||||
version = ... # type: _int
|
||||
|
||||
RESERVED_NCS = ... # type: int
|
||||
RFC_4122 = ... # type: int
|
||||
|
||||
Reference in New Issue
Block a user