Define threading.local as a proper class (#2086)

Fixes #1591
This commit is contained in:
Emil Hessman
2018-04-30 17:48:12 +02:00
committed by Jelle Zijlstra
parent 97e261cce8
commit 4d8010a988

View File

@@ -40,10 +40,10 @@ if sys.version_info >= (3,):
class ThreadError(Exception): ...
# TODO: Change to a class with __getattr__ and __setattr__
# once mypy supports universal __setattr__.
# See https://github.com/python/mypy/issues/521
local = ... # type: Any
class local(object):
def __getattribute__(self, name: str) -> Any: ...
def __setattr__(self, name: str, value: Any) -> None: ...
def __delattr__(self, name: str) -> None: ...
class Thread: