pydoc: 3.11 changes (#7910)

This commit is contained in:
Jelle Zijlstra
2022-05-21 08:49:39 -07:00
committed by GitHub
parent 237b1bb189
commit 39c777f70c
2 changed files with 29 additions and 16 deletions

View File

@@ -1,3 +1,4 @@
import sys
from _typeshed import OptExcInfo, SupportsWrite
from abc import abstractmethod
from builtins import list as _list # "list" conflicts with method name
@@ -78,21 +79,36 @@ class HTMLDoc(Doc):
repr = _repr_instance.repr
escape = _repr_instance.escape
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: str | None = ...,
gap: str = ...,
) -> str: ...
if sys.version_info >= (3, 11):
def heading(self, title: str, extras: str = ...) -> str: ...
def section(
self,
title: str,
cls: str,
contents: str,
width: int = ...,
prelude: str = ...,
marginalia: str | None = ...,
gap: str = ...,
) -> str: ...
def multicolumn(self, list: list[_T], format: Callable[[_T], str]) -> str: ...
else:
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: str | None = ...,
gap: str = ...,
) -> str: ...
def multicolumn(self, list: list[_T], format: Callable[[_T], str], cols: int = ...) -> str: ...
def bigsection(self, title: str, *args: Any) -> str: ...
def preformat(self, text: str) -> str: ...
def multicolumn(self, list: list[_T], format: Callable[[_T], str], cols: int = ...) -> str: ...
def grey(self, text: str) -> str: ...
def namelink(self, name: str, *dicts: MutableMapping[str, str]) -> str: ...
def classlink(self, object: object, modname: str) -> str: ...