From 40f2fbbd5fdb4f8ac1d24d5811874ddfcc25f420 Mon Sep 17 00:00:00 2001 From: Kimoon Han Date: Tue, 17 Dec 2024 20:50:25 +0900 Subject: [PATCH] docs: fix linkcode for identify methods patched in metaclass --- docs/source/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index a41c0fac..ef2d7f2f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -94,6 +94,10 @@ def linkcode_resolve(domain, info) -> str | None: modname = info["module"] fullname = info["fullname"] + # Handle dataloader metaclass substitution + if fullname.endswith(".identify") and not fullname.endswith(".LoaderBase.identify"): + fullname = fullname.replace(".identify", "._original_identify") + submod = sys.modules.get(modname) if submod is None: return None