Your docstrings seem to come from the standard logging library . They look like this:
class Manager(object):
"""
There is [under normal circumstances] just one Manager instance, which
holds the hierarchy of loggers.
"""
and
class RootLogger(Logger):
"""
A root logger is not that different to any other logger, except that
it must have a logging level and there is only one instance of it in
the hierarchy.
"""
This is the code that returns the string autosummary ( autosummary/__init__.py):
m = re.search(r"^([A-Z][^A-Z]*?\.\s)", " ".join(doc).strip())
if m:
summary = m.group(1).strip()
elif doc:
summary = doc[0].strip()
else:
summary = '':
doc is docstring as a list of strings.
docstring. :
, .
^([A-Z].*?\.\s?)
-, . ( , .)