intersphinx_disabled_refs, rename 'all' to '*'

This commit is contained in:
Jakob Lykke Andersen
2021-10-31 13:23:23 +01:00
parent 9e1ba751ec
commit cfbac2ceaa
3 changed files with 4 additions and 4 deletions

View File

@@ -157,7 +157,7 @@ linking:
- the name of a specific reference type,
e.g., ``std:doc``, ``py:func``, or ``cpp:class``,
- the name of a whole domain, e.g., ``std``, ``py``, or ``cpp``, or
- the special name ``all``.
- the special name ``*``.
When a cross-reference without an explicit inventory specification is being
resolved by intersphinx, skip resolution it matches one of the
@@ -171,7 +171,7 @@ linking:
At the same time, all cross-references generated in, e.g., Python,
declarations will still be attempted to be resolved by intersphinx.
If ``all`` is in the list of domains, then no references without an explicit
If ``*`` is in the list of domains, then no references without an explicit
inventory will be resolved by intersphinx.

View File

@@ -363,7 +363,7 @@ def _resolve_reference(env: BuildEnvironment, inv_name: Optional[str], inventory
# disabling should only be done if no inventory is given
honor_disabled_refs = honor_disabled_refs and inv_name is None
if honor_disabled_refs and 'all' in env.config.intersphinx_disabled_refs:
if honor_disabled_refs and '*' in env.config.intersphinx_disabled_refs:
return None
typ = node['reftype']

View File

@@ -350,7 +350,7 @@ def test_missing_reference_disabled_domain(tempdir, app, status, warning):
case(term=False, doc=False, py=True)
# disabled all domains
app.config.intersphinx_disabled_refs = ['all']
app.config.intersphinx_disabled_refs = ['*']
case(term=False, doc=False, py=False)