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:
Dakkaron
2016-05-23 18:16:01 +02:00
committed by Guido van Rossum
parent 11049f9a4f
commit 25f5c9c6f8
4 changed files with 108 additions and 106 deletions

View File

@@ -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] = ...,