mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-28 12:32:20 +08:00
apply black and isort (#4287)
* apply black and isort * move some type ignores
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Stubs for uuid
|
||||
|
||||
import sys
|
||||
from typing import Tuple, Optional, Any, Text
|
||||
from typing import Any, Optional, Text, Tuple
|
||||
|
||||
# Because UUID has properties called int and bytes we need to rename these temporarily.
|
||||
_Int = int
|
||||
@@ -15,26 +15,31 @@ if sys.version_info >= (3, 7):
|
||||
unsafe: int
|
||||
unknown: None
|
||||
|
||||
|
||||
class UUID:
|
||||
if sys.version_info >= (3, 7):
|
||||
def __init__(self, hex: Optional[Text] = ...,
|
||||
bytes: Optional[_Bytes] = ...,
|
||||
bytes_le: Optional[_Bytes] = ...,
|
||||
fields: Optional[_FieldsType] = ...,
|
||||
int: Optional[_Int] = ...,
|
||||
version: Optional[_Int] = ...,
|
||||
*,
|
||||
is_safe: SafeUUID = ...) -> None: ...
|
||||
def __init__(
|
||||
self,
|
||||
hex: Optional[Text] = ...,
|
||||
bytes: Optional[_Bytes] = ...,
|
||||
bytes_le: Optional[_Bytes] = ...,
|
||||
fields: Optional[_FieldsType] = ...,
|
||||
int: Optional[_Int] = ...,
|
||||
version: Optional[_Int] = ...,
|
||||
*,
|
||||
is_safe: SafeUUID = ...,
|
||||
) -> None: ...
|
||||
@property
|
||||
def is_safe(self) -> SafeUUID: ...
|
||||
else:
|
||||
def __init__(self, hex: Optional[Text] = ...,
|
||||
bytes: Optional[_Bytes] = ...,
|
||||
bytes_le: Optional[_Bytes] = ...,
|
||||
fields: Optional[_FieldsType] = ...,
|
||||
int: Optional[_Int] = ...,
|
||||
version: Optional[_Int] = ...) -> None: ...
|
||||
def __init__(
|
||||
self,
|
||||
hex: Optional[Text] = ...,
|
||||
bytes: Optional[_Bytes] = ...,
|
||||
bytes_le: Optional[_Bytes] = ...,
|
||||
fields: Optional[_FieldsType] = ...,
|
||||
int: Optional[_Int] = ...,
|
||||
version: Optional[_Int] = ...,
|
||||
) -> None: ...
|
||||
@property
|
||||
def bytes(self) -> _Bytes: ...
|
||||
@property
|
||||
@@ -67,9 +72,7 @@ class UUID:
|
||||
def variant(self) -> str: ...
|
||||
@property
|
||||
def version(self) -> Optional[_Int]: ...
|
||||
|
||||
def __int__(self) -> _Int: ...
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
def __eq__(self, other: Any) -> bool: ...
|
||||
def __lt__(self, other: Any) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user