Skip to content

Commit df60dcb

Browse files
committed
Resolve a branch mix-up
1 parent f2a9bad commit df60dcb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/tools/extensions/c_annotations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,21 +184,21 @@ def add_annotations(app: Sphinx, doctree: nodes.document) -> None:
184184
)
185185
raise ValueError(msg)
186186

187-
# Skip the note if any ancestor has 'omit-stable-abi-note'
187+
# Skip the note if any ancestor has 'omit-stable-abi-notes'
188188
# in a 'c_annotations' attribute.
189189
ancestor = node
190190
while ancestor:
191-
if 'omit-stable-abi-note' not in ancestor.get(
191+
if 'omit-stable-abi-notes' in ancestor.get(
192192
'c_annotations',
193193
[],
194194
):
195195
break
196-
ancestor = node.parent
196+
ancestor = ancestor.parent
197197
else:
198+
198199
# no skip; add the annotation
199200
annotation = _stable_abi_annotation(record)
200201
node.insert(0, annotation)
201-
node.setdefault("classes", []).append('ADDED-HERE')
202202

203203
# Unstable API annotation.
204204
if name.startswith("PyUnstable"):

0 commit comments

Comments
 (0)