@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 6d0df0ebeb
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 13:30 UTC

[Docs] Generate correct github links for decorated functions (#17125)

Signed-off-by: Russell Bryant <rbryant@redhat.com>

Russell Bryant committed Apr 24, 2025 at 13:39 UTC 6d0df0ebebd4e347e1ebcdea4be010a4b54b901b
1 file changed +5
docs/source/conf.py
+5
@@ -177,6 +177,11 @@ def linkcode_resolve(domain, info):
177 for part in info['fullname'].split('.'):
178 obj = getattr(obj, part)
179
180 + # Skip decorator wrappers by checking if the object is a function
181 + # and has a __wrapped__ attribute (which decorators typically set)
182 + while hasattr(obj, '__wrapped__'):
183 + obj = obj.__wrapped__
184 +
185 if not (inspect.isclass(obj) or inspect.isfunction(obj)
186 or inspect.ismethod(obj)):
187 obj = obj.__class__ # Get the class of the instance