Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions stdlib/uuid.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import builtins
import sys
from _typeshed import Unused
from enum import Enum
from typing import Final
from typing import Final, NoReturn
from typing_extensions import LiteralString, TypeAlias

_FieldsType: TypeAlias = tuple[int, int, int, int, int, int]
Expand All @@ -13,6 +14,9 @@ class SafeUUID(Enum):

class UUID:
__slots__ = ("int", "is_safe", "__weakref__")
is_safe: Final[SafeUUID]
int: Final[builtins.int]

def __init__(
self,
hex: str | None = None,
Expand All @@ -25,8 +29,6 @@ class UUID:
is_safe: SafeUUID = SafeUUID.unknown,
) -> None: ...
@property
def is_safe(self) -> SafeUUID: ...
@property
def bytes(self) -> builtins.bytes: ...
@property
def bytes_le(self) -> builtins.bytes: ...
Expand All @@ -41,8 +43,6 @@ class UUID:
@property
def hex(self) -> str: ...
@property
def int(self) -> builtins.int: ...
@property
def node(self) -> builtins.int: ...
@property
def time(self) -> builtins.int: ...
Expand All @@ -65,6 +65,7 @@ class UUID:
def __gt__(self, other: UUID) -> bool: ...
def __ge__(self, other: UUID) -> bool: ...
def __hash__(self) -> builtins.int: ...
def __setattr__(self, name: Unused, value: Unused) -> NoReturn: ...

def getnode() -> int: ...
def uuid1(node: int | None = None, clock_seq: int | None = None) -> UUID: ...
Expand Down