mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-16 02:51:28 +08:00
PY2: UUID accepts both unicode and str (#2478)
This commit is contained in:
1 parent
6968ff6cb0
commit
3af4ff9f94
1 file changed
+3
-2
@@ -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