11import builtins
22import sys
3+ from _typeshed import Unused
34from enum import Enum
4- from typing import Final
5+ from typing import Final , NoReturn
56from typing_extensions import LiteralString , TypeAlias
67
78_FieldsType : TypeAlias = tuple [int , int , int , int , int , int ]
@@ -13,6 +14,9 @@ class SafeUUID(Enum):
1314
1415class UUID :
1516 __slots__ = ("int" , "is_safe" , "__weakref__" )
17+ is_safe : Final [SafeUUID ]
18+ int : Final [builtins .int ]
19+
1620 def __init__ (
1721 self ,
1822 hex : str | None = None ,
@@ -25,8 +29,6 @@ class UUID:
2529 is_safe : SafeUUID = SafeUUID .unknown ,
2630 ) -> None : ...
2731 @property
28- def is_safe (self ) -> SafeUUID : ...
29- @property
3032 def bytes (self ) -> builtins .bytes : ...
3133 @property
3234 def bytes_le (self ) -> builtins .bytes : ...
@@ -41,8 +43,6 @@ class UUID:
4143 @property
4244 def hex (self ) -> str : ...
4345 @property
44- def int (self ) -> builtins .int : ...
45- @property
4646 def node (self ) -> builtins .int : ...
4747 @property
4848 def time (self ) -> builtins .int : ...
@@ -65,6 +65,7 @@ class UUID:
6565 def __gt__ (self , other : UUID ) -> bool : ...
6666 def __ge__ (self , other : UUID ) -> bool : ...
6767 def __hash__ (self ) -> builtins .int : ...
68+ def __setattr__ (self , name : Unused , value : Unused ) -> NoReturn : ...
6869
6970def getnode () -> int : ...
7071def uuid1 (node : int | None = None , clock_seq : int | None = None ) -> UUID : ...
0 commit comments