Skip to content

Commit 0443303

Browse files
committed
Revert processed_signatures changes
1 parent d983e9a commit 0443303

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tests/test_ext_autodoc/test_ext_autodoc.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ def make_directive_bridge(env: BuildEnvironment) -> DocumenterBridge:
7777
return directive
7878

7979

80+
processed_signatures = []
81+
82+
8083
@pytest.mark.sphinx('html', testroot='root')
8184
def test_parse_name(app):
8285
env = app.env
@@ -182,7 +185,8 @@ def get_attr(obj: Any, name: str, *defargs: Any) -> Any:
182185

183186
@pytest.mark.sphinx('html', testroot='root')
184187
def test_format_signatures(app):
185-
def process_signature(_app, _what, name, _obj, _options, _args, _retann):
188+
def process_signature(_app, what, name, _obj, _options, _args, _retann):
189+
processed_signatures.append((what, name))
186190
if name == '.bar':
187191
return '42', None
188192
return None
@@ -578,20 +582,17 @@ def test_attrgetter_using(app):
578582

579583

580584
def _assert_getter_works(app, directive, objtype, name, attrs=(), **kw):
585+
getattr_spy = set()
586+
581587
def _special_getattr(obj, attr_name, *defargs):
582588
if attr_name in attrs:
583589
getattr_spy.add((obj, attr_name))
584590
return None
585591
return getattr(obj, attr_name, *defargs)
586592

587-
def _process_signature(_app, what, name, _obj, _options, _args, _retann):
588-
processed_signatures.add((what, name))
589-
590593
app.add_autodoc_attrgetter(type, _special_getattr)
591-
app.connect('autodoc-process-signature', _process_signature)
592594

593-
getattr_spy = set()
594-
processed_signatures = set()
595+
getattr_spy.clear()
595596
app.registry.documenters[objtype](directive, name).generate(**kw)
596597

597598
hooked_members = {s[1] for s in getattr_spy}

0 commit comments

Comments
 (0)