mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
PY2: UUID accepts both unicode and str (#2478)
This commit is contained in:
committed by
Sebastian Rittau
parent
6968ff6cb0
commit
3af4ff9f94
@@ -1,7 +1,7 @@
|
||||
# Stubs for uuid
|
||||
|
||||
import sys
|
||||
from typing import Tuple, Optional, Any
|
||||
from typing import Tuple, Optional, Any, Text
|
||||
|
||||
# Because UUID has properties called int and bytes we need to rename these temporarily.
|
||||
_Int = int
|
||||
@@ -9,7 +9,8 @@ _Bytes = bytes
|
||||
_FieldsType = Tuple[int, int, int, int, int, int]
|
||||
|
||||
class UUID:
|
||||
def __init__(self, hex: Optional[str] = ..., bytes: Optional[_Bytes] = ...,
|
||||
def __init__(self, hex: Optional[Text] = ...,
|
||||
bytes: Optional[_Bytes] = ...,
|
||||
bytes_le: Optional[_Bytes] = ...,
|
||||
fields: Optional[_FieldsType] = ...,
|
||||
int: Optional[_Int] = ...,
|
||||
|
||||
Reference in New Issue
Block a user