MCPcopy Index your code
hub / github.com/pyinvoke/invoke / helpline

Function helpline

invoke/util.py:130–143  ·  view source on GitHub ↗

Yield an object's first docstring line, or None if there was no docstring. .. versionadded:: 1.0

(obj: object)

Source from the content-addressed store, hash-verified

128
129
130def helpline(obj: object) -> Optional[str]:
131 """
132 Yield an object's first docstring line, or None if there was no docstring.
133
134 .. versionadded:: 1.0
135 """
136 docstring = obj.__doc__
137 if (
138 not docstring
139 or not docstring.strip()
140 or docstring == type(obj).__doc__
141 ):
142 return None
143 return docstring.lstrip().splitlines()[0]
144
145
146class ExceptionHandlingThread(threading.Thread):

Callers 2

_make_pairsMethod · 0.70
serializedMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…