Avoid duplicate calls to autodoc-process-docstring (#4198)

This commit is contained in:
Joel Nothman
2018-01-08 13:09:29 +11:00
committed by Takayuki SHIMIZUKAWA
parent e015ce2a0f
commit db415ba05c
2 changed files with 5 additions and 1 deletions

View File

@@ -73,6 +73,10 @@ def test_get_items_summary(app, status, warning):
def handler(app, what, name, obj, options, lines):
assert isinstance(lines, list)
# ensure no docstring is processed twice:
assert 'THIS HAS BEEN HANDLED' not in lines
lines.append('THIS HAS BEEN HANDLED')
app.connect('autodoc-process-docstring', handler)
sphinx.ext.autosummary.Autosummary.get_items = new_get_items