mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user