Skip to content

Commit 1754c28

Browse files
Update sphinx/domains/std/__init__.py
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent ddc704a commit 1754c28

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sphinx/domains/std/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,10 +1023,9 @@ def _intersphinx_resolve_xref_lookup(self, store: dict[str, dict[str, Any]],
10231023
# * 'term': https://github.com/sphinx-doc/sphinx/issues/9291
10241024
# * 'label': https://github.com/sphinx-doc/sphinx/issues/12008
10251025
target_lower = target.lower()
1026-
insensitive_matches = list(filter(lambda k: k.lower() == target_lower,
1027-
store[objtype].keys()))
1028-
if insensitive_matches:
1029-
return store[objtype][insensitive_matches[0]]
1026+
for object_name, object_data in store[objtype].items():
1027+
if object_name.lower() == target_lower:
1028+
return object_data
10301029
return None
10311030

10321031
def get_objects(self) -> Iterator[tuple[str, str, str, str, str, int]]:

0 commit comments

Comments
 (0)