refactor(types): auto -> None sweep across entire codebase
Applied 236 return type annotations to functions with no return values across 100+ files (core modules, tests, scripts, simulations). Added Phase 4 to python_style_refactor track for remaining 597 items (untyped params, vars, and functions with return values). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import random
|
||||
from api_hook_client import ApiHookClient
|
||||
from simulation.workflow_sim import WorkflowSimulator
|
||||
|
||||
def main():
|
||||
def main() -> None:
|
||||
client = ApiHookClient()
|
||||
print("=== Manual Slop: Live UX Walkthrough ===")
|
||||
print("Connecting to GUI...")
|
||||
|
||||
@@ -4,7 +4,7 @@ import time
|
||||
from simulation.sim_base import BaseSimulation, run_sim
|
||||
|
||||
class AISettingsSimulation(BaseSimulation):
|
||||
def run(self):
|
||||
def run(self) -> None:
|
||||
print("\n--- Running AI Settings Simulation (Gemini Only) ---")
|
||||
# 1. Verify initial model
|
||||
provider = self.client.get_value("current_provider")
|
||||
|
||||
@@ -9,7 +9,7 @@ from simulation.workflow_sim import WorkflowSimulator
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
|
||||
class BaseSimulation:
|
||||
def __init__(self, client: ApiHookClient = None):
|
||||
def __init__(self, client: ApiHookClient = None) -> None:
|
||||
if client is None:
|
||||
self.client = ApiHookClient()
|
||||
else:
|
||||
@@ -36,7 +36,7 @@ class BaseSimulation:
|
||||
self.client.set_value("current_model", "gemini-2.5-flash-lite")
|
||||
time.sleep(0.2)
|
||||
|
||||
def teardown(self):
|
||||
def teardown(self) -> None:
|
||||
if self.project_path and os.path.exists(self.project_path):
|
||||
# We keep it for debugging if it failed, but usually we'd clean up
|
||||
# os.remove(self.project_path)
|
||||
|
||||
@@ -4,7 +4,7 @@ import time
|
||||
from simulation.sim_base import BaseSimulation, run_sim
|
||||
|
||||
class ContextSimulation(BaseSimulation):
|
||||
def run(self):
|
||||
def run(self) -> None:
|
||||
print("\n--- Running Context & Chat Simulation ---")
|
||||
# 1. Test Discussion Creation
|
||||
disc_name = f"TestDisc_{int(time.time())}"
|
||||
|
||||
@@ -9,7 +9,7 @@ class ExecutionSimulation(BaseSimulation):
|
||||
if os.path.exists("hello.ps1"):
|
||||
os.remove("hello.ps1")
|
||||
|
||||
def run(self):
|
||||
def run(self) -> None:
|
||||
print("\n--- Running Execution & Modals Simulation ---")
|
||||
# 1. Trigger script generation (Async so we don't block on the wait loop)
|
||||
msg = "Create a hello.ps1 script that prints 'Simulation Test' and execute it."
|
||||
|
||||
@@ -4,7 +4,7 @@ import time
|
||||
from simulation.sim_base import BaseSimulation, run_sim
|
||||
|
||||
class ToolsSimulation(BaseSimulation):
|
||||
def run(self):
|
||||
def run(self) -> None:
|
||||
print("\n--- Running Tools Simulation ---")
|
||||
# 1. Trigger list_directory tool
|
||||
msg = "List the files in the current directory."
|
||||
|
||||
@@ -4,7 +4,7 @@ from api_hook_client import ApiHookClient
|
||||
from simulation.user_agent import UserSimAgent
|
||||
|
||||
class WorkflowSimulator:
|
||||
def __init__(self, hook_client: ApiHookClient):
|
||||
def __init__(self, hook_client: ApiHookClient) -> None:
|
||||
self.client = hook_client
|
||||
self.user_agent = UserSimAgent(hook_client)
|
||||
|
||||
@@ -30,7 +30,7 @@ class WorkflowSimulator:
|
||||
self.client.select_list_item("disc_listbox", name)
|
||||
time.sleep(1)
|
||||
|
||||
def load_prior_log(self):
|
||||
def load_prior_log(self) -> None:
|
||||
print("Loading prior log")
|
||||
self.client.click("btn_load_log")
|
||||
# This usually opens a file dialog which we can't easily automate from here
|
||||
|
||||
Reference in New Issue
Block a user