refactor: reduce calls of find_pending_xref_conditions (refs: #9240)

After #9246, `find_pending_xref_conditions()` should be only called from
intended modules.  At present, the Python Domain is the only module to
call it intendedly.  Therefore, this removes the needless calls of the
utility function from "unintended" modules.
This commit is contained in:
Takeshi KOMIYA
2021-05-20 02:10:43 +09:00
parent d2d2d7bde3
commit 5a8dec457a
3 changed files with 2 additions and 25 deletions

View File

@@ -196,14 +196,6 @@ def test_missing_reference_pydomain(tempdir, app, status, warning):
rn = missing_reference(app, app.env, node, contnode)
assert rn.astext() == 'Foo.bar'
# pending_xref_condition="resolved"
node = addnodes.pending_xref('', reftarget='Foo.bar', refdomain='py', reftype='attr')
node['py:module'] = 'module1'
node += addnodes.pending_xref_condition('', 'Foo.bar', condition='resolved')
node += addnodes.pending_xref_condition('', 'module1.Foo.bar', condition='*')
rn = missing_reference(app, app.env, node, nodes.Text('dummy-cont-node'))
assert rn.astext() == 'Foo.bar'
def test_missing_reference_stddomain(tempdir, app, status, warning):
inv_file = tempdir / 'inventory'