mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Use bound methods in pydoc (#7426)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user