Use lowercase tuple where possible (#6170)

This commit is contained in:
Akuli
2021-10-15 00:18:19 +00:00
committed by GitHub
parent 5f386b0575
commit 994b69ef8f
242 changed files with 1212 additions and 1224 deletions

View File

@@ -13,7 +13,7 @@ __credits__: str
def pathdirs() -> list[str]: ...
def getdoc(object: object) -> str: ...
def splitdoc(doc: AnyStr) -> Tuple[AnyStr, AnyStr]: ...
def splitdoc(doc: AnyStr) -> tuple[AnyStr, AnyStr]: ...
def classname(object: object, modname: str) -> str: ...
def isdata(object: object) -> bool: ...
def replace(text: AnyStr, *pairs: AnyStr) -> AnyStr: ...
@@ -21,10 +21,10 @@ def cram(text: str, maxlen: int) -> str: ...
def stripid(text: str) -> str: ...
def allmethods(cl: type) -> MutableMapping[str, MethodType]: ...
def visiblename(name: str, all: Container[str] | None = ..., obj: object | None = ...) -> bool: ...
def classify_class_attrs(object: object) -> list[Tuple[str, str, type, str]]: ...
def classify_class_attrs(object: object) -> list[tuple[str, str, type, str]]: ...
def ispackage(path: str) -> bool: ...
def source_synopsis(file: IO[AnyStr]) -> AnyStr | None: ...
def synopsis(filename: str, cache: MutableMapping[str, Tuple[int, str]] = ...) -> str | None: ...
def synopsis(filename: str, cache: MutableMapping[str, tuple[int, str]] = ...) -> str | None: ...
class ErrorDuringImport(Exception):
filename: str
@@ -86,7 +86,7 @@ class HTMLDoc(Doc):
def namelink(self, name: str, *dicts: MutableMapping[str, str]) -> str: ...
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 modpkglink(self, modpkginfo: tuple[str, str, bool, bool]) -> str: ...
def markup(
self,
text: str,
@@ -96,7 +96,7 @@ class HTMLDoc(Doc):
methods: Mapping[str, str] = ...,
) -> str: ...
def formattree(
self, tree: list[Tuple[type, Tuple[type, ...]] | list[Any]], modname: str, parent: type | None = ...
self, tree: list[tuple[type, Tuple[type, ...]] | list[Any]], modname: str, parent: type | None = ...
) -> str: ...
def docmodule(self, object: object, name: str | None = ..., mod: str | None = ..., *ignored: Any) -> str: ...
def docclass(
@@ -148,7 +148,7 @@ class TextDoc(Doc):
def indent(self, text: str, prefix: str = ...) -> str: ...
def section(self, title: str, contents: str) -> str: ...
def formattree(
self, tree: list[Tuple[type, Tuple[type, ...]] | list[Any]], modname: str, parent: type | None = ..., prefix: str = ...
self, tree: list[tuple[type, Tuple[type, ...]] | list[Any]], modname: str, parent: type | None = ..., prefix: str = ...
) -> str: ...
def docmodule(self, object: object, name: str | None = ..., mod: Any | None = ..., *ignored: Any) -> str: ...
def docclass(self, object: object, name: str | None = ..., mod: str | None = ..., *ignored: Any) -> str: ...
@@ -188,7 +188,7 @@ html: HTMLDoc
class _OldStyleClass: ...
def resolve(thing: str | object, forceload: bool = ...) -> Tuple[object, str] | None: ...
def resolve(thing: str | object, forceload: bool = ...) -> tuple[object, str] | None: ...
def render_doc(thing: str | object, title: str = ..., forceload: bool = ..., renderer: Doc | None = ...) -> str: ...
def doc(thing: str | object, title: str = ..., forceload: bool = ..., output: SupportsWrite[str] | None = ...) -> None: ...
def writedoc(thing: str | object, forceload: bool = ...) -> None: ...
@@ -197,7 +197,7 @@ def writedocs(dir: str, pkgpath: str = ..., done: Any | None = ...) -> None: ...
_list = list # "list" conflicts with method name
class Helper:
keywords: dict[str, str | Tuple[str, str]]
keywords: dict[str, str | tuple[str, str]]
symbols: dict[str, str]
topics: dict[str, str | Tuple[str, ...]]
def __init__(self, input: IO[str] | None = ..., output: IO[str] | None = ...) -> None: ...