Yield an object's first docstring line, or None if there was no docstring. .. versionadded:: 1.0
(obj: object)
| 128 | |
| 129 | |
| 130 | def 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 | |
| 146 | class ExceptionHandlingThread(threading.Thread): |
no outgoing calls
no test coverage detected
searching dependent graphs…