mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-25 06:38:09 -05:00
Fix _CurrentDocument membership testing with '{c,cpp}:parent_symbol'
This commit is contained in:
1 parent
92b5303219
commit
b3881bb234
1 file changed
+1
-1
@@ -1069,7 +1069,7 @@ class _CurrentDocument:
|
||||
|
||||
def __contains__(self, item: str) -> bool:
|
||||
if item in {'c:parent_symbol', 'cpp:parent_symbol'}:
|
||||
return getattr(self, item) is not None
|
||||
return getattr(self, self.__attr_map[item]) is not None
|
||||
return item in self.__attr_map or item in self._extension_data
|
||||
|
||||
def __iter__(self) -> Iterator[str]:
|
||||
|
||||
Reference in new issue
Block a user