Skip to content
Merged
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions doc-source/ignore_missing_xref.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 3rd party
from docutils import nodes
from sphinx.application import Sphinx
from sphinx.errors import NoUri


def handle_missing_xref(app: Sphinx, env, node: nodes.Node, contnode: nodes.Node) -> None:
if node.get("reftarget", '').startswith("tokenize_rt."):
raise NoUri


def setup(app: Sphinx):
app.connect("missing-reference", handle_missing_xref, priority=950)
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ extensions = [
"sphinx_favicon",
"sphinx_toolbox_experimental.missing_xref",
"sphinx_packaging",
"ignore_missing_xref",
]
gitstamp_fmt = "%d %b %Y"
templates_path = [ "_templates",]
Expand Down
1 change: 1 addition & 0 deletions repo_helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ extra_sphinx_extensions:
# - sphinx_toolbox_experimental.changelog
- sphinx_toolbox_experimental.missing_xref
- sphinx_packaging
- ignore_missing_xref

sphinx_conf_epilogue:
# - "\tfrom sphinx_toolbox.latex import replace_unknown_unicode"
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ dom-toml>=2.0.0
domdf-python-tools>=3.0.0
entrypoints>=0.3
formate>=1.2.1
tokenize-rt>=5.0.0
typing-extensions>=3.10.0.0
Loading
Loading