Skip to content

Commit 5666f07

Browse files
committed
fixup, re-fix old bug in Python-related objtypes
Only add method to obj types if it's not there already.
1 parent ed452c2 commit 5666f07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sphinx/domains/python/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ def _intersphinx_adjust_object_types(self, env: BuildEnvironment,
831831
node: pending_xref, contnode: Element,
832832
objtypes: list[str]) -> None:
833833
# we adjust the object types for backwards compatibility
834-
if 'attribute' in objtypes:
834+
if 'attribute' in objtypes and 'method' not in objtypes:
835835
# Since Sphinx-2.1, properties are stored as py:method
836836
objtypes.append('method')
837837

0 commit comments

Comments
 (0)