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:
2026-02-28 11:16:56 -05:00
parent 07f4e36016
commit 60396f03f8
98 changed files with 311 additions and 240 deletions

View File

@@ -15,7 +15,7 @@ class HookServerInstance(ThreadingHTTPServer):
class HookHandler(BaseHTTPRequestHandler):
"""Handles incoming HTTP requests for the API hooks."""
def do_GET(self):
def do_GET(self) -> None:
app = self.server.app
session_logger.log_api_hook("GET", self.path, "")
if self.path == '/status':
@@ -175,7 +175,7 @@ class HookHandler(BaseHTTPRequestHandler):
self.send_response(404)
self.end_headers()
def do_POST(self):
def do_POST(self) -> None:
app = self.server.app
content_length = int(self.headers.get('Content-Length', 0))
body = self.rfile.read(content_length)
@@ -283,7 +283,7 @@ class HookServer:
self.server = None
self.thread = None
def start(self):
def start(self) -> None:
if self.thread and self.thread.is_alive():
return
is_gemini_cli = getattr(self.app, 'current_provider', '') == 'gemini_cli'
@@ -309,7 +309,7 @@ class HookServer:
self.thread.start()
logging.info(f"Hook server started on port {self.port}")
def stop(self):
def stop(self) -> None:
if self.server:
self.server.shutdown()
self.server.server_close()