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:
12
events.py
12
events.py
@@ -9,11 +9,11 @@ class EventEmitter:
|
||||
Simple event emitter for decoupled communication between modules.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
"""Initializes the EventEmitter with an empty listener map."""
|
||||
self._listeners: Dict[str, List[Callable]] = {}
|
||||
|
||||
def on(self, event_name: str, callback: Callable):
|
||||
def on(self, event_name: str, callback: Callable) -> None:
|
||||
"""
|
||||
Registers a callback for a specific event.
|
||||
|
||||
@@ -25,7 +25,7 @@ class EventEmitter:
|
||||
self._listeners[event_name] = []
|
||||
self._listeners[event_name].append(callback)
|
||||
|
||||
def emit(self, event_name: str, *args: Any, **kwargs: Any):
|
||||
def emit(self, event_name: str, *args: Any, **kwargs: Any) -> None:
|
||||
"""
|
||||
Emits an event, calling all registered callbacks.
|
||||
|
||||
@@ -43,11 +43,11 @@ class AsyncEventQueue:
|
||||
Asynchronous event queue for decoupled communication using asyncio.Queue.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
"""Initializes the AsyncEventQueue with an internal asyncio.Queue."""
|
||||
self._queue: asyncio.Queue = asyncio.Queue()
|
||||
|
||||
async def put(self, event_name: str, payload: Any = None):
|
||||
async def put(self, event_name: str, payload: Any = None) -> None:
|
||||
"""
|
||||
Puts an event into the queue.
|
||||
|
||||
@@ -71,7 +71,7 @@ class UserRequestEvent:
|
||||
Payload for a user request event.
|
||||
"""
|
||||
|
||||
def __init__(self, prompt: str, stable_md: str, file_items: List[Any], disc_text: str, base_dir: str):
|
||||
def __init__(self, prompt: str, stable_md: str, file_items: List[Any], disc_text: str, base_dir: str) -> None:
|
||||
self.prompt = prompt
|
||||
self.stable_md = stable_md
|
||||
self.file_items = file_items
|
||||
|
||||
Reference in New Issue
Block a user