when creating the python bindings for Detector class, it should ignore the assignment operators (#1106)

This commit is contained in:
maliakal_d 2025-02-26 12:20:35 +01:00 committed by GitHub
parent 7b2e6ae4ab
commit ff6a2655a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,6 +123,9 @@ def visit(node):
if node.kind == cindex.CursorKind.CLASS_DECL:
if node.displayname == "Detector":
for child in node.get_children():
# Skip assignment operators
if child.kind == cindex.CursorKind.CXX_METHOD and child.spelling == "operator=":
continue
if (
child.kind == cindex.CursorKind.CXX_METHOD
and child.access_specifier == cindex.AccessSpecifier.PUBLIC