あなたのドキュメント文字列は、標準ライブラリのloggingモジュールから来ているようです。それらは次のようになります。
class Manager(object):
"""
There is [under normal circumstances] just one Manager instance, which
holds the hierarchy of loggers.
"""
と
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.
"""
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
行のリストとしてのdocstringです。
autosummary 文字列は、docstring の最初の文であると想定されています。ただし、正規表現には次のような問題があります。
- 最初の大文字の後に、文に追加の大文字を含めることはできません。
- ピリオドの後には空白文字が必要です。
これは、正規表現が上記のドキュメント文字列のいずれとも一致しないことを意味します。パターンを次のように変更した場合
^([A-Z].*?\.\s?)
両方の docstring に一致し、完全な最初の文が出力に表示されます。(これは最適な正規表現ではないかもしれませんが、少なくともこの場合は機能します。)