Fix _CurrentDocument membership testing with '{c,cpp}:parent_symbol'

This commit is contained in:
Adam Turner committed 2025-03-02 22:16:20 +00:00
1 parent 92b5303219
commit b3881bb234
1 file changed
+1 -1
+1 -1
View File
@@ -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]: