Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
6d0df0eb
Unverified
Commit
6d0df0eb
authored
Apr 24, 2025
by
Russell Bryant
Committed by
GitHub
Apr 24, 2025
Browse files
[Docs] Generate correct github links for decorated functions (#17125)
Signed-off-by:
Russell Bryant
<
rbryant@redhat.com
>
parent
0fa939e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
docs/source/conf.py
docs/source/conf.py
+5
-0
No files found.
docs/source/conf.py
View file @
6d0df0eb
...
...
@@ -177,6 +177,11 @@ def linkcode_resolve(domain, info):
for
part
in
info
[
'fullname'
].
split
(
'.'
):
obj
=
getattr
(
obj
,
part
)
# Skip decorator wrappers by checking if the object is a function
# and has a __wrapped__ attribute (which decorators typically set)
while
hasattr
(
obj
,
'__wrapped__'
):
obj
=
obj
.
__wrapped__
if
not
(
inspect
.
isclass
(
obj
)
or
inspect
.
isfunction
(
obj
)
or
inspect
.
ismethod
(
obj
)):
obj
=
obj
.
__class__
# Get the class of the instance
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment