( # noqa: PLR0913, PLR0917
self,
env: BuildEnvironment,
fromdocname: str,
builder: Builder,
type: str, # noqa: A002
target: str,
node: pending_xref,
contnode: Element,
)
| 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) |
nothing calls this directly
no outgoing calls
no test coverage detected