apply black and isort (#4287)

* apply black and isort

* move some type ignores
This commit is contained in:
Jelle Zijlstra
2020-06-28 13:31:00 -07:00
committed by GitHub
parent fe58699ca5
commit 5d553c9584
800 changed files with 13875 additions and 10332 deletions

View File

@@ -1,7 +1,25 @@
import sys
from typing import Any, AnyStr, Callable, Container, Dict, IO, List, Mapping, MutableMapping, NoReturn, Optional, Text, Tuple, Type, Union
from types import FunctionType, MethodType, ModuleType, TracebackType
from typing import (
IO,
Any,
AnyStr,
Callable,
Container,
Dict,
List,
Mapping,
MutableMapping,
NoReturn,
Optional,
Text,
Tuple,
Type,
Union,
)
from _typeshed import SupportsWrite
if sys.version_info >= (3,):
from reprlib import Repr
else:
@@ -26,7 +44,6 @@ def stripid(text: str) -> str: ...
def allmethods(cl: type) -> MutableMapping[str, MethodType]: ...
def visiblename(name: str, all: Optional[Container[str]] = ..., obj: Optional[object] = ...) -> bool: ...
def classify_class_attrs(object: object) -> List[Tuple[str, str, type, str]]: ...
def ispackage(path: str) -> bool: ...
def source_synopsis(file: IO[AnyStr]) -> Optional[AnyStr]: ...
def synopsis(filename: str, cache: MutableMapping[str, Tuple[int, str]] = ...) -> Optional[str]: ...
@@ -73,7 +90,17 @@ class HTMLDoc(Doc):
escape: Callable[[str], str]
def page(self, title: str, contents: str) -> str: ...
def heading(self, title: str, fgcol: str, bgcol: str, extras: str = ...) -> str: ...
def section(self, title: str, fgcol: str, bgcol: str, contents: str, width: int = ..., prelude: str = ..., marginalia: Optional[str] = ..., gap: str = ...) -> str: ...
def section(
self,
title: str,
fgcol: str,
bgcol: str,
contents: str,
width: int = ...,
prelude: str = ...,
marginalia: Optional[str] = ...,
gap: str = ...,
) -> str: ...
def bigsection(self, title: str, *args) -> str: ...
def preformat(self, text: str) -> str: ...
def multicolumn(self, list: List[Any], format: Callable[[Any], str], cols: int = ...) -> str: ...
@@ -82,15 +109,46 @@ class HTMLDoc(Doc):
def classlink(self, object: object, modname: str) -> str: ...
def modulelink(self, object: object) -> str: ...
def modpkglink(self, modpkginfo: 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[Any]]], modname: str, parent: Optional[type] = ...) -> 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[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 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: ...
def docroutine(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., funcs: Mapping[str, str] = ..., classes: Mapping[str, str] = ..., methods: Mapping[str, str] = ..., cl: Optional[type] = ..., *ignored) -> str: ...
def docproperty(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., cl: Optional[Any] = ..., *ignored) -> str: ...
def docroutine(
self,
object: object,
name: Optional[str] = ...,
mod: Optional[str] = ...,
funcs: Mapping[str, str] = ...,
classes: Mapping[str, str] = ...,
methods: Mapping[str, str] = ...,
cl: Optional[type] = ...,
*ignored,
) -> str: ...
def docproperty(
self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., cl: Optional[Any] = ..., *ignored
) -> str: ...
def docother(self, object: object, name: Optional[str] = ..., mod: Optional[Any] = ..., *ignored) -> str: ...
def docdata(self, object: object, name: Optional[str] = ..., mod: Optional[Any] = ..., cl: Optional[Any] = ..., *ignored) -> str: ...
def docdata(
self, object: object, name: Optional[str] = ..., mod: Optional[Any] = ..., cl: Optional[Any] = ..., *ignored
) -> str: ...
def index(self, dir: str, shadowed: Optional[MutableMapping[str, bool]] = ...) -> str: ...
def filelink(self, url: str, path: str) -> str: ...
@@ -111,14 +169,35 @@ 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[Any]]], 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: ...
def docroutine(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., cl: Optional[Any] = ..., *ignored) -> str: ...
def docproperty(self, object: object, name: Optional[str] = ..., mod: Optional[Any] = ..., cl: Optional[Any] = ..., *ignored) -> str: ...
def docdata(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., cl: Optional[Any] = ..., *ignored) -> str: ...
def docother(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., parent: Optional[str] = ..., maxlen: Optional[int] = ..., doc: Optional[Any] = ..., *ignored) -> str: ...
def docroutine(
self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., cl: Optional[Any] = ..., *ignored
) -> str: ...
def docproperty(
self, object: object, name: Optional[str] = ..., mod: Optional[Any] = ..., cl: Optional[Any] = ..., *ignored
) -> str: ...
def docdata(
self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., cl: Optional[Any] = ..., *ignored
) -> str: ...
def docother(
self,
object: object,
name: Optional[str] = ...,
mod: Optional[str] = ...,
parent: Optional[str] = ...,
maxlen: Optional[int] = ...,
doc: Optional[Any] = ...,
*ignored,
) -> str: ...
def pager(text: str) -> None: ...
def getpager() -> Callable[[str], None]: ...
@@ -137,7 +216,9 @@ class _OldStyleClass: ...
def resolve(thing: Union[str, object], forceload: bool = ...) -> Optional[Tuple[object, str]]: ...
def render_doc(thing: Union[str, object], title: str = ..., forceload: bool = ..., renderer: Optional[Doc] = ...) -> str: ...
def doc(thing: Union[str, object], title: str = ..., forceload: bool = ..., output: Optional[SupportsWrite[str]] = ...) -> None: ...
def doc(
thing: Union[str, object], title: str = ..., forceload: bool = ..., output: Optional[SupportsWrite[str]] = ...
) -> None: ...
def writedoc(thing: Union[str, object], forceload: bool = ...) -> None: ...
def writedocs(dir: str, pkgpath: str = ..., done: Optional[Any] = ...) -> None: ...
@@ -174,12 +255,20 @@ 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[[str], None]] = ...) -> 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 ispath(x: Any) -> bool: ...
def cli() -> None: ...
if sys.version_info < (3,):
def serve(port: int, callback: Optional[Callable[[Any], None]] = ..., completer: Optional[Callable[[], None]] = ...) -> None: ...
def serve(
port: int, callback: Optional[Callable[[Any], None]] = ..., completer: Optional[Callable[[], None]] = ...
) -> None: ...
def gui() -> None: ...