8000 Added stub for Python 3's _threading_local (#1462) · python/typeshed@47b3979 · GitHub
[go: up one dir, main page]

Skip to content

Commit 47b3979

Browse files
ashwchJelleZijlstra
authored andcommitted
Added stub for Python 3's _threading_local (#1462)
1 parent 7637549 commit 47b3979

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

stdlib/3/_threading_local.pyi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Source: https://github.com/python/cpython/blob/master/Lib/_threading_local.py
2+
from typing import Any, Dict, List, Tuple
3+
from weakref import ReferenceType
4+
5+
__all__: List[str]
6+
localdict = Dict[Any, Any]
7+
8+
class _localimpl:
9+
key: str
10+
dicts: Dict[int, Tuple[ReferenceType, localdict]]
11+
def __init__(self) -> None: ...
12+
def get_dict(self) -> localdict: ...
13+
def create_dict(self) -> localdict: ...
14+
15+
class local:
16+
def __getattribute__(self, name: str) -> Any: ...
17+
def __setattr__(self, name: str, value: Any) -> None: ...
18+
def __delattr__(self, name: str) -> None: ...

0 commit comments

Comments
 (0)
0