Skip to content

Commit

Permalink
docs: remove lxml intersphinx workaround
Browse files Browse the repository at this point in the history
Now that we use `etree._Element` instead of `etree.Element` in our
docstrings and type annotations, we don't need this workaround anymore.
  • Loading branch information
jkhsjdhjs authored and s-heppner committed Jun 20, 2024
1 parent 2ef4cfe commit ce1568f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import os
import sys
import datetime
from sphinx.ext import intersphinx


sys.path.insert(0, os.path.abspath('../..'))
Expand Down Expand Up @@ -75,11 +74,6 @@ def on_missing_reference(app, env, node, contnode):
# see: https://github.com/rwth-iat/PyECMA376-2/issues/3
if path[0] == "pyecma376_2":
return contnode
# lxml uses _Element instead of Element and _ElementTree instead of ElementTree in its documentation,
# causing missing references if untreated.
if len(path) > 2 and path[0:2] == ["lxml", "etree"] and path[2] in {"Element", "ElementTree"}:
node["reftarget"] = ".".join(path[0:2] + ["_" + path[2]] + path[3:])
return intersphinx.resolve_reference_in_inventory(env, "lxml", node, contnode)
return None


Expand Down

0 comments on commit ce1568f

Please sign in to comment.