mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
* mark undocumented attributes * use pep 585 generics, replace optional types with pep 604-style hints
17 lines
721 B
Python
17 lines
721 B
Python
from typing import Any, Dict, List, Protocol, Tuple
|
|
|
|
_ModuleGlobals = Dict[str, Any]
|
|
_ModuleMetadata = Tuple[int, float, List[str], str]
|
|
|
|
class _SourceLoader(Protocol):
|
|
def __call__(self) -> str | None: ...
|
|
|
|
cache: Dict[str, _SourceLoader | _ModuleMetadata] # undocumented
|
|
|
|
def getline(filename: str, lineno: int, module_globals: _ModuleGlobals | None = ...) -> str: ...
|
|
def clearcache() -> None: ...
|
|
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: ...
|