diff --git a/stdlib/2/linecache.pyi b/stdlib/2/linecache.pyi deleted file mode 100644 index 82386a534..000000000 --- a/stdlib/2/linecache.pyi +++ /dev/null @@ -1,3 +0,0 @@ -def getline(filename, lineno, module_globals=None): ... -def clearcache(): ... -def checkcache(filename=None): ... diff --git a/stdlib/2and3/linecache.pyi b/stdlib/2and3/linecache.pyi new file mode 100644 index 000000000..9a152d6a0 --- /dev/null +++ b/stdlib/2and3/linecache.pyi @@ -0,0 +1,12 @@ +import sys +from typing import Any, Dict, List, Optional, Text + +_ModuleGlobals = Dict[str, Any] + +def getline(filename: Text, lineno: int, module_globals: Optional[_ModuleGlobals] = ...) -> str: ... +def clearcache() -> None: ... +def getlines(filename: Text, module_globals: Optional[_ModuleGlobals] = ...) -> None: ... +def checkcache(filename: Optional[Text] = ...) -> None: ... +def updatecache(filename: Text, module_globals: Optional[_ModuleGlobals] = ...) -> List[str]: ... +if sys.version_info >= (3, 5): + def lazycache(filename: Text, module_globals: _ModuleGlobals) -> bool: ... diff --git a/stdlib/3/linecache.pyi b/stdlib/3/linecache.pyi deleted file mode 100644 index 4f14f6af6..000000000 --- a/stdlib/3/linecache.pyi +++ /dev/null @@ -1,5 +0,0 @@ -from typing import Any - -def getline(filename: str, lineno: int, module_globals: Any=...) -> str: ... -def clearcache() -> None: ... -def getlines(filename: str, module_globals: Any=...) -> None: ...