mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-21 09:08:27 +08:00
Added type annotations and small fixes (#219)
* json.loads() accepts unicode * threading.BoundedSemaphore is subclass of Semaphore * Added type annotations for logging/__init__.pyi and logging/handlers.pyi * Changed style of variable declaration to fit the rest of the file
This commit is contained in:
committed by
Guido van Rossum
parent
11049f9a4f
commit
25f5c9c6f8
@@ -1,4 +1,4 @@
|
||||
from typing import Any, IO, Optional, Tuple, Callable, Dict, List
|
||||
from typing import Any, IO, Optional, Tuple, Callable, Dict, List, Union, Text
|
||||
|
||||
class JSONDecodeError(object):
|
||||
def dumps(self, obj: Any) -> str: ...
|
||||
@@ -33,7 +33,7 @@ def dump(obj: Any,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> None: ...
|
||||
|
||||
def loads(s: str,
|
||||
def loads(s: Union[Text, bytes],
|
||||
encoding: Any = ...,
|
||||
cls: Any = ...,
|
||||
object_hook: Callable[[Dict], Any] = ...,
|
||||
|
||||
Reference in New Issue
Block a user