MCPcopy Index your code
hub / github.com/RustPython/RustPython / _extend_docstrings

Function _extend_docstrings

Lib/email/_policybase.py:99–109  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

97 return doc + '\n' + added_doc
98
99def _extend_docstrings(cls):
100 if cls.__doc__ and cls.__doc__.startswith('+'):
101 cls.__doc__ = _append_doc(cls.__bases__[0].__doc__, cls.__doc__)
102 for name, attr in cls.__dict__.items():
103 if attr.__doc__ and attr.__doc__.startswith('+'):
104 for c in (c for base in cls.__bases__ for c in base.mro()):
105 doc = getattr(getattr(c, name), '__doc__')
106 if doc:
107 attr.__doc__ = _append_doc(doc, attr.__doc__)
108 break
109 return cls
110
111
112class Policy(_PolicyBase, metaclass=abc.ABCMeta):

Callers

nothing calls this directly

Calls 5

_append_docFunction · 0.85
getattrFunction · 0.85
startswithMethod · 0.45
itemsMethod · 0.45
mroMethod · 0.45

Tested by

no test coverage detected