Fix some errors with --disallow-any-generics (#3276)

See #3267. Covers all of stdlib/2and3.
This commit is contained in:
Guido van Rossum
2019-09-29 09:15:27 -07:00
committed by GitHub
parent 1e881ad156
commit b336182b69
27 changed files with 85 additions and 92 deletions

View File

@@ -81,7 +81,7 @@ class HTMLDoc(Doc):
def modulelink(self, object: object) -> str: ...
def modpkglink(self, data: Tuple[str, str, bool, bool]) -> str: ...
def markup(self, text: str, escape: Optional[Callable[[str], str]] = ..., funcs: Mapping[str, str] = ..., classes: Mapping[str, str] = ..., methods: Mapping[str, str] = ...) -> str: ...
def formattree(self, tree: List[Union[Tuple[type, Tuple[type, ...]], list]], modname: str, parent: Optional[type] = ...) -> str: ...
def formattree(self, tree: List[Union[Tuple[type, Tuple[type, ...]], List[Any]]], modname: str, parent: Optional[type] = ...) -> str: ...
def docmodule(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., *ignored) -> str: ...
def docclass(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., funcs: Mapping[str, str] = ..., classes: Mapping[str, str] = ..., *ignored) -> str: ...
def formatvalue(self, object: object) -> str: ...
@@ -108,7 +108,7 @@ class TextDoc(Doc):
def bold(self, text: str) -> str: ...
def indent(self, text: str, prefix: str = ...) -> str: ...
def section(self, title: str, contents: str) -> str: ...
def formattree(self, tree: List[Union[Tuple[type, Tuple[type, ...]], list]], modname: str, parent: Optional[type] = ..., prefix: str = ...) -> str: ...
def formattree(self, tree: List[Union[Tuple[type, Tuple[type, ...]], List[Any]]], modname: str, parent: Optional[type] = ..., prefix: str = ...) -> str: ...
def docmodule(self, object: object, name: Optional[str] = ..., mod: Optional[Any] = ..., *ignored) -> str: ...
def docclass(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., *ignored) -> str: ...
def formatvalue(self, object: object) -> str: ...
@@ -171,7 +171,7 @@ help: Helper
class ModuleScanner:
quit: bool
def run(self, callback: Callable[[Optional[str], str, str], None], key: Optional[Any] = ..., completer: Optional[Callable[[], None]] = ..., onerror: Optional[Callable] = ...) -> None: ...
def run(self, callback: Callable[[Optional[str], str, str], None], key: Optional[Any] = ..., completer: Optional[Callable[[], None]] = ..., onerror: Optional[Callable[[str], None]] = ...) -> None: ...
def apropos(key: str) -> None: ...
def serve(port: int, callback: Optional[Callable[[Any], None]] = ..., completer: Optional[Callable[[], None]] = ...) -> None: ...