massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / uuid.pyi
1 import sys
2 from typing import Any, Tuple
3
4 # Because UUID has properties called int and bytes we need to rename these temporarily.
5 _Int = int
6 _Bytes = bytes
7 _FieldsType = Tuple[int, int, int, int, int, int]
8
9 if sys.version_info >= (3, 7):
10     from enum import Enum
11     class SafeUUID(Enum):
12         safe: int
13         unsafe: int
14         unknown: None
15
16 class UUID:
17     if sys.version_info >= (3, 7):
18         def __init__(
19             self,
20             hex: str | None = ...,
21             bytes: _Bytes | None = ...,
22             bytes_le: _Bytes | None = ...,
23             fields: _FieldsType | None = ...,
24             int: _Int | None = ...,
25             version: _Int | None = ...,
26             *,
27             is_safe: SafeUUID = ...,
28         ) -> None: ...
29         @property
30         def is_safe(self) -> SafeUUID: ...
31     else:
32         def __init__(
33             self,
34             hex: str | None = ...,
35             bytes: _Bytes | None = ...,
36             bytes_le: _Bytes | None = ...,
37             fields: _FieldsType | None = ...,
38             int: _Int | None = ...,
39             version: _Int | None = ...,
40         ) -> None: ...
41     @property
42     def bytes(self) -> _Bytes: ...
43     @property
44     def bytes_le(self) -> _Bytes: ...
45     @property
46     def clock_seq(self) -> _Int: ...
47     @property
48     def clock_seq_hi_variant(self) -> _Int: ...
49     @property
50     def clock_seq_low(self) -> _Int: ...
51     @property
52     def fields(self) -> _FieldsType: ...
53     @property
54     def hex(self) -> str: ...
55     @property
56     def int(self) -> _Int: ...
57     @property
58     def node(self) -> _Int: ...
59     @property
60     def time(self) -> _Int: ...
61     @property
62     def time_hi_version(self) -> _Int: ...
63     @property
64     def time_low(self) -> _Int: ...
65     @property
66     def time_mid(self) -> _Int: ...
67     @property
68     def urn(self) -> str: ...
69     @property
70     def variant(self) -> str: ...
71     @property
72     def version(self) -> _Int | None: ...
73     def __int__(self) -> _Int: ...
74     def __eq__(self, other: Any) -> bool: ...
75     def __lt__(self, other: Any) -> bool: ...
76     def __le__(self, other: Any) -> bool: ...
77     def __gt__(self, other: Any) -> bool: ...
78     def __ge__(self, other: Any) -> bool: ...
79
80 def getnode() -> int: ...
81 def uuid1(node: _Int | None = ..., clock_seq: _Int | None = ...) -> UUID: ...
82 def uuid3(namespace: UUID, name: str) -> UUID: ...
83 def uuid4() -> UUID: ...
84 def uuid5(namespace: UUID, name: str) -> UUID: ...
85
86 NAMESPACE_DNS: UUID
87 NAMESPACE_URL: UUID
88 NAMESPACE_OID: UUID
89 NAMESPACE_X500: UUID
90 RESERVED_NCS: str
91 RFC_4122: str
92 RESERVED_MICROSOFT: str
93 RESERVED_FUTURE: str