From 47b3979a839f5b30ee3462cb4ffaa6bc4e788dcb Mon Sep 17 00:00:00 2001 From: Ashwini Chaudhary Date: Tue, 11 Jul 2017 09:50:02 +0530 Subject: [PATCH] Added stub for Python 3's _threading_local (#1462) --- stdlib/3/_threading_local.pyi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 stdlib/3/_threading_local.pyi diff --git a/stdlib/3/_threading_local.pyi b/stdlib/3/_threading_local.pyi new file mode 100644 index 000000000..a286d2dd5 --- /dev/null +++ b/stdlib/3/_threading_local.pyi @@ -0,0 +1,18 @@ +# Source: https://github.com/python/cpython/blob/master/Lib/_threading_local.py +from typing import Any, Dict, List, Tuple +from weakref import ReferenceType + +__all__: List[str] +localdict = Dict[Any, Any] + +class _localimpl: + key: str + dicts: Dict[int, Tuple[ReferenceType, localdict]] + def __init__(self) -> None: ... + def get_dict(self) -> localdict: ... + def create_dict(self) -> localdict: ... + +class local: + def __getattribute__(self, name: str) -> Any: ... + def __setattr__(self, name: str, value: Any) -> None: ... + def __delattr__(self, name: str) -> None: ...