Fix bounds check in internal parser

This commit is contained in:
baldurk
2026-08-31 12:30:22 +01:00
parent 1aac7afdf1
commit e4bd23b671
@@ -2228,7 +2228,7 @@ class PyReflector:
src = "\n" * (line - 1) + func
node = ast.parse(src)
if not isinstance(node, ast.Module) or len(node.body) == []:
if not isinstance(node, ast.Module) or len(node.body) == 0:
return "", "", ""
node = node.body[0]