MCPcopy Create free account
hub / github.com/tox-dev/filelock / PatchedPythonDomain

Class PatchedPythonDomain

docs/conf.py:57–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 """
56
57 class PatchedPythonDomain(PythonDomain):
58 def resolve_xref( # noqa: PLR0913, PLR0917
59 self,
60 env: BuildEnvironment,
61 fromdocname: str,
62 builder: Builder,
63 type: str, # noqa: A002
64 target: str,
65 node: pending_xref,
66 contnode: Element,
67 ) -> Element:
68 mapping = {"_thread._local": ("threading.local", "local")}
69 if target in mapping:
70 of_type, with_name = mapping[target]
71 target = node["reftarget"] = of_type
72 contnode.children[0] = Text(with_name, with_name)
73 return super().resolve_xref(env, fromdocname, builder, type, target, node, contnode)
74
75 app.add_domain(PatchedPythonDomain, override=True)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected