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:
@@ -24,7 +24,7 @@ class TestHeadlessAPI(unittest.TestCase):
|
||||
self.api = self.app_instance.create_api()
|
||||
self.client = TestClient(self.api)
|
||||
|
||||
def test_health_endpoint(self):
|
||||
def test_health_endpoint(self) -> None:
|
||||
response = self.client.get("/health")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.json(), {"status": "ok"})
|
||||
@@ -42,7 +42,7 @@ class TestHeadlessAPI(unittest.TestCase):
|
||||
response = self.client.get("/status", headers=headers)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
def test_generate_endpoint(self):
|
||||
def test_generate_endpoint(self) -> None:
|
||||
payload = {
|
||||
"prompt": "Hello AI"
|
||||
}
|
||||
@@ -100,7 +100,7 @@ class TestHeadlessAPI(unittest.TestCase):
|
||||
if dummy_log.exists():
|
||||
dummy_log.unlink()
|
||||
|
||||
def test_get_context_endpoint(self):
|
||||
def test_get_context_endpoint(self) -> None:
|
||||
response = self.client.get("/api/v1/context", headers=self.headers)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
data = response.json()
|
||||
@@ -152,14 +152,14 @@ class TestHeadlessStartup(unittest.TestCase):
|
||||
app.run()
|
||||
mock_immapp_run.assert_called_once()
|
||||
|
||||
def test_fastapi_installed():
|
||||
def test_fastapi_installed() -> None:
|
||||
"""Verify that fastapi is installed."""
|
||||
try:
|
||||
importlib.import_module("fastapi")
|
||||
except ImportError:
|
||||
pytest.fail("fastapi is not installed")
|
||||
|
||||
def test_uvicorn_installed():
|
||||
def test_uvicorn_installed() -> None:
|
||||
"""Verify that uvicorn is installed."""
|
||||
try:
|
||||
importlib.import_module("uvicorn")
|
||||
|
||||
Reference in New Issue
Block a user