MCPcopy Index your code
hub / github.com/python/cpython / _extend_docstrings

Function _extend_docstrings

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

Source from the content-addressed store, hash-verified

106 return doc + '\n' + added_doc
107
108def _extend_docstrings(cls):
109 if cls.__doc__ and cls.__doc__.startswith('+'):
110 cls.__doc__ = _append_doc(cls.__bases__[0].__doc__, cls.__doc__)
111 for name, attr in cls.__dict__.items():
112 if attr.__doc__ and attr.__doc__.startswith('+'):
113 for c in (c for base in cls.__bases__ for c in base.mro()):
114 doc = getattr(getattr(c, name), '__doc__')
115 if doc:
116 attr.__doc__ = _append_doc(doc, attr.__doc__)
117 break
118 return cls
119
120
121class Policy(_PolicyBase, metaclass=abc.ABCMeta):

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…