mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Avoid duplicate calls to autodoc-process-docstring (#4198)
This commit is contained in:
committed by
Takayuki SHIMIZUKAWA
parent
e015ce2a0f
commit
db415ba05c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user