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:
@@ -2,7 +2,7 @@ import pytest
|
||||
import textwrap
|
||||
from scripts.ai_style_formatter import format_code
|
||||
|
||||
def test_basic_indentation():
|
||||
def test_basic_indentation() -> None:
|
||||
source = textwrap.dedent("""\
|
||||
def hello():
|
||||
print("world")
|
||||
@@ -17,7 +17,7 @@ def test_basic_indentation():
|
||||
)
|
||||
assert format_code(source) == expected
|
||||
|
||||
def test_top_level_blank_lines():
|
||||
def test_top_level_blank_lines() -> None:
|
||||
source = textwrap.dedent("""\
|
||||
def a():
|
||||
pass
|
||||
@@ -35,7 +35,7 @@ def test_top_level_blank_lines():
|
||||
)
|
||||
assert format_code(source) == expected
|
||||
|
||||
def test_inner_blank_lines():
|
||||
def test_inner_blank_lines() -> None:
|
||||
source = textwrap.dedent("""\
|
||||
def a():
|
||||
print("start")
|
||||
@@ -49,7 +49,7 @@ def test_inner_blank_lines():
|
||||
)
|
||||
assert format_code(source) == expected
|
||||
|
||||
def test_multiline_string_safety():
|
||||
def test_multiline_string_safety() -> None:
|
||||
source = textwrap.dedent("""\
|
||||
def a():
|
||||
'''
|
||||
@@ -72,7 +72,7 @@ def test_multiline_string_safety():
|
||||
assert " This is a multiline" in result
|
||||
assert result.startswith("def a():\n '''")
|
||||
|
||||
def test_continuation_indentation():
|
||||
def test_continuation_indentation() -> None:
|
||||
source = textwrap.dedent("""\
|
||||
def long_func(
|
||||
a,
|
||||
@@ -95,7 +95,7 @@ def test_continuation_indentation():
|
||||
)
|
||||
assert format_code(source) == expected
|
||||
|
||||
def test_multiple_top_level_definitions():
|
||||
def test_multiple_top_level_definitions() -> None:
|
||||
source = textwrap.dedent("""\
|
||||
class MyClass:
|
||||
def __init__(self):
|
||||
|
||||
Reference in New Issue
Block a user