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

@@ -3,7 +3,7 @@ from unittest.mock import MagicMock, patch
import subprocess
from shell_runner import run_powershell
def test_run_powershell_qa_callback_on_failure():
def test_run_powershell_qa_callback_on_failure() -> None:
"""
Test that qa_callback is called when a powershell command fails (non-zero exit code).
The result of the callback should be appended to the output.
@@ -27,7 +27,7 @@ def test_run_powershell_qa_callback_on_failure():
assert "STDERR:\nsomething went wrong" in output
assert "EXIT CODE: 1" in output
def test_run_powershell_qa_callback_on_stderr_only():
def test_run_powershell_qa_callback_on_stderr_only() -> None:
"""
Test that qa_callback is called when a command has stderr even if exit code is 0.
"""
@@ -45,7 +45,7 @@ def test_run_powershell_qa_callback_on_stderr_only():
assert "QA ANALYSIS: Ignorable warning." in output
assert "STDOUT:\nSuccess" in output
def test_run_powershell_no_qa_callback_on_success():
def test_run_powershell_no_qa_callback_on_success() -> None:
"""
Test that qa_callback is NOT called when the command succeeds without stderr.
"""
@@ -64,7 +64,7 @@ def test_run_powershell_no_qa_callback_on_success():
assert "EXIT CODE: 0" in output
assert "QA ANALYSIS" not in output
def test_run_powershell_optional_qa_callback():
def test_run_powershell_optional_qa_callback() -> None:
"""
Test that run_powershell still works without providing a qa_callback.
"""
@@ -81,7 +81,7 @@ def test_run_powershell_optional_qa_callback():
assert "STDERR:\nerror" in output
assert "EXIT CODE: 1" in output
def test_end_to_end_tier4_integration():
def test_end_to_end_tier4_integration() -> None:
"""
Verifies that shell_runner.run_powershell correctly uses ai_client.run_tier4_analysis.
"""
@@ -101,7 +101,7 @@ def test_end_to_end_tier4_integration():
mock_analysis.assert_called_once_with(stderr_content)
assert f"QA ANALYSIS:\n{expected_analysis}" in output
def test_ai_client_passes_qa_callback():
def test_ai_client_passes_qa_callback() -> None:
"""
Verifies that ai_client.send passes the qa_callback down to the provider function.
"""
@@ -123,7 +123,7 @@ def test_ai_client_passes_qa_callback():
# qa_callback is the 7th positional argument in _send_gemini
assert args[6] == qa_callback
def test_gemini_provider_passes_qa_callback_to_run_script():
def test_gemini_provider_passes_qa_callback_to_run_script() -> None:
"""
Verifies that _send_gemini passes the qa_callback to _run_script.
"""