From ce1568f33da6ddf5f0fca78b09320a4338df72cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20M=C3=B6ller?= Date: Thu, 20 Jun 2024 00:28:51 +0200 Subject: [PATCH] docs: remove lxml intersphinx workaround Now that we use `etree._Element` instead of `etree.Element` in our docstrings and type annotations, we don't need this workaround anymore. --- docs/source/conf.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 29faf0ed6..976c72dac 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,7 +13,6 @@ import os import sys import datetime -from sphinx.ext import intersphinx sys.path.insert(0, os.path.abspath('../..')) @@ -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