23 lines
942 B
Python
23 lines
942 B
Python
import re
|
|
import sys
|
|
|
|
files = ['ai_client.py', 'aggregate.py', 'mcp_client.py', 'shell_runner.py']
|
|
for file_path in files:
|
|
print(f"Checking {file_path}...")
|
|
with open(file_path, 'r', encoding='utf-8') as f:
|
|
lines = f.readlines()
|
|
for i, line in enumerate(lines):
|
|
if line.strip().startswith('def '):
|
|
if '->' not in line:
|
|
# Check next line if it's a multiline def
|
|
if '):' not in line:
|
|
full_def = line
|
|
j = i + 1
|
|
while j < len(lines) and '):' not in lines[j-1]:
|
|
full_def += lines[j]
|
|
j += 1
|
|
if '->' not in full_def:
|
|
print(f" Missing hint at line {i+1}: {line.strip()}")
|
|
else:
|
|
print(f" Missing hint at line {i+1}: {line.strip()}")
|