mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-16 11:01:27 +08:00
Add type hint for linecache.cache dict (#5805)
This commit is contained in:
1 parent
41f4f0f00f
commit
a6a744a9d0
1 file changed
+11
-5
+11
-5
@@ -1,10 +1,16 @@
|
||||
from typing import Any, Dict, List, Optional
|
||||
from typing import Any, Dict, List, Protocol, Tuple
|
||||
|
||||
_ModuleGlobals = Dict[str, Any]
|
||||
_ModuleMetadata = Tuple[int, float, List[str], str]
|
||||
|
||||
def getline(filename: str, lineno: int, module_globals: Optional[_ModuleGlobals] = ...) -> str: ...
|
||||
class _SourceLoader(Protocol):
|
||||
def __call__(self) -> str | None: ...
|
||||
|
||||
cache: Dict[str, _SourceLoader | _ModuleMetadata]
|
||||
|
||||
def getline(filename: str, lineno: int, module_globals: _ModuleGlobals | None = ...) -> str: ...
|
||||
def clearcache() -> None: ...
|
||||
def getlines(filename: str, module_globals: Optional[_ModuleGlobals] = ...) -> List[str]: ...
|
||||
def checkcache(filename: Optional[str] = ...) -> None: ...
|
||||
def updatecache(filename: str, module_globals: Optional[_ModuleGlobals] = ...) -> List[str]: ...
|
||||
def getlines(filename: str, module_globals: _ModuleGlobals | None = ...) -> List[str]: ...
|
||||
def checkcache(filename: str | None = ...) -> None: ...
|
||||
def updatecache(filename: str, module_globals: _ModuleGlobals | None = ...) -> List[str]: ...
|
||||
def lazycache(filename: str, module_globals: _ModuleGlobals) -> bool: ...
|
||||
Reference in new issue
Block a user