File: linecache.pyi

package info (click to toggle)
typeshed 0.0~git20260204.516eed0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 32,220 kB
  • sloc: python: 9,096; makefile: 21; sh: 18
file content (19 lines) | stat: -rw-r--r-- 852 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from collections.abc import Callable
from typing import Any
from typing_extensions import TypeAlias

__all__ = ["getline", "clearcache", "checkcache", "lazycache"]

_ModuleGlobals: TypeAlias = dict[str, Any]
_ModuleMetadata: TypeAlias = tuple[int, float | None, list[str], str]

_SourceLoader: TypeAlias = tuple[Callable[[], str | None]]

cache: dict[str, _SourceLoader | _ModuleMetadata]  # undocumented

def getline(filename: str, lineno: int, module_globals: _ModuleGlobals | None = None) -> str: ...
def clearcache() -> None: ...
def getlines(filename: str, module_globals: _ModuleGlobals | None = None) -> list[str]: ...
def checkcache(filename: str | None = None) -> None: ...
def updatecache(filename: str, module_globals: _ModuleGlobals | None = None) -> list[str]: ...
def lazycache(filename: str, module_globals: _ModuleGlobals) -> bool: ...