fix(types): add class-level type hints to ACP event classes#585
Open
github-actions[bot] wants to merge 1 commit intomainfrom
Open
fix(types): add class-level type hints to ACP event classes#585github-actions[bot] wants to merge 1 commit intomainfrom
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
Addresses item from code quality report. - Add class-level type hints to EventSubscriber (session_id, conn, conversation, shared_events_handler) - Add class-level type hints to TokenBasedEventSubscriber (session_id, conn, loop, conversation, _streaming_tool_calls, shared_events_handler, _reasoning_header_emitted) - Add class-level type hints to ToolCallState (all 11 instance attributes) - Add -> None return type to __init__ methods Addresses findings from #583 Co-authored-by: openhands <openhands@all-hands.dev>
enyst
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds class-level type hints to ACP event-related classes as identified in the code quality report.
Changes
EventSubscriber:session_id: str,conn: Client,conversation: BaseConversation | None,shared_events_handler: SharedEventHandlerTokenBasedEventSubscriber:session_id: str,conn: Client,loop: asyncio.AbstractEventLoop,conversation: BaseConversation | None,_streaming_tool_calls: dict[int, ToolCallState],shared_events_handler: SharedEventHandler,_reasoning_header_emitted: boolToolCallState:tool_call_id,tool_name,is_think,args,lexer,prev_emitted_thought_chunk,started,thought_header_emitted,_valid_skeleton_cached,_cached_kind,summary-> Nonereturn type to__init__methodsRelated Issue
Addresses findings from #583
Testing
make lint)make test- 1272 tests passed)This PR was automatically generated by the Code Quality Report workflow.