Skip to content

Commit 181950f

Browse files
committed
Fix the name filtering.
1 parent b7d591e commit 181950f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

python/pyxstubgen.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,9 @@ def funcdef(self, tree: Tree) -> None:
291291
if isinstance(child_type, Token):
292292
if child_type.value == "name": # Get the function
293293
func_name = rule_name(child)
294-
if func_name in ("__cinit__", "__dealloc__") or func_name[0] == "_":
294+
if func_name in ("__cinit__", "__dealloc__"):
295+
return
296+
if func_name[0] == "_" and func_name[1] != '_':
295297
return
296298
elif child_type.value == "cparameters": # Get the function parameters
297299
parameters: List[str] = []

0 commit comments

Comments
 (0)