merge and complete linecache stubs (#1320)

This commit is contained in:
Jelle Zijlstra
2017-05-26 08:30:42 -07:00
committed by Guido van Rossum
parent 4f2dd0f446
commit fefdf185c7
3 changed files with 12 additions and 8 deletions

View File

@@ -1,3 +0,0 @@
def getline(filename, lineno, module_globals=None): ...
def clearcache(): ...
def checkcache(filename=None): ...

View File

@@ -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: ...

View File

@@ -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: ...