chore(checkpoint): Phase 4 Codebase-Wide Type Hint Sweep complete. Total fixes: ~400+. Verification status: 230 pass, 16 fail (pre-existing API drift), 29 error (live_gui env).
This commit is contained in:
@@ -19,6 +19,7 @@ for root, dirs, files in os.walk('.'):
|
||||
continue
|
||||
counts: list[int] = [0, 0, 0] # nr, up, uv
|
||||
def scan(scope: ast.AST, prefix: str = '') -> None:
|
||||
# Iterate top-level nodes in this scope
|
||||
for node in ast.iter_child_nodes(scope):
|
||||
if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
|
||||
if node.returns is None:
|
||||
@@ -26,11 +27,11 @@ for root, dirs, files in os.walk('.'):
|
||||
for arg in node.args.args:
|
||||
if arg.arg not in ('self', 'cls') and arg.annotation is None:
|
||||
counts[1] += 1
|
||||
if isinstance(node, ast.Assign):
|
||||
elif isinstance(node, ast.Assign):
|
||||
for t in node.targets:
|
||||
if isinstance(t, ast.Name):
|
||||
counts[2] += 1
|
||||
if isinstance(node, ast.ClassDef):
|
||||
elif isinstance(node, ast.ClassDef):
|
||||
scan(node, prefix=f'{node.name}.')
|
||||
scan(tree)
|
||||
nr, up, uv = counts
|
||||
|
||||
Reference in New Issue
Block a user