diff --git a/stdlib/2/uuid.pyi b/stdlib/2/uuid.pyi index ce8a2a4c8..8091cda70 100644 --- a/stdlib/2/uuid.pyi +++ b/stdlib/2/uuid.pyi @@ -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