Skip to content

Commit b3881bb

Browse files
committed
Fix _CurrentDocument membership testing with '{c,cpp}:parent_symbol'
1 parent 92b5303 commit b3881bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sphinx/environment/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ def __delitem__(self, key: str) -> None:
10691069

10701070
def __contains__(self, item: str) -> bool:
10711071
if item in {'c:parent_symbol', 'cpp:parent_symbol'}:
1072-
return getattr(self, item) is not None
1072+
return getattr(self, self.__attr_map[item]) is not None
10731073
return item in self.__attr_map or item in self._extension_data
10741074

10751075
def __iter__(self) -> Iterator[str]:

0 commit comments

Comments
 (0)