Use bound methods in pydoc (#7426)

This commit is contained in:
Alex Waygood
2022-03-06 23:49:15 +00:00
committed by GitHub
parent 9796b9ed69
commit ea6e06a60d

View File

@@ -75,8 +75,9 @@ class HTMLRepr(Repr):
def repr_unicode(self, x: AnyStr, level: complex) -> str: ...
class HTMLDoc(Doc):
repr: Callable[[object], str]
escape: Callable[[str], str]
_repr_instance: HTMLRepr = ...
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(
@@ -149,7 +150,8 @@ class TextRepr(Repr):
def repr_instance(self, x: object, level: complex) -> str: ...
class TextDoc(Doc):
repr: Callable[[object], str]
_repr_instance: TextRepr = ...
repr = _repr_instance.repr
def bold(self, text: str) -> str: ...
def indent(self, text: str, prefix: str = ...) -> str: ...
def section(self, title: str, contents: str) -> str: ...