Skip to content

fix(types): add missing return type annotations#584

Merged
enyst merged 3 commits intomainfrom
fix/code-quality/add-missing-return-type-hints
Mar 9, 2026
Merged

fix(types): add missing return type annotations#584
enyst merged 3 commits intomainfrom
fix/code-quality/add-missing-return-type-hints

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Mar 9, 2026

Summary

Adds missing return type annotations to methods identified in the code quality report.

Changes

  • Add -> None return type to pause_runner_without_blocking() in tui/core/conversation_runner.py
  • Add -> None return type to __call__(), _handle_action_event(), _handle_message_event() in acp_impl/events/event.py
  • Add -> None return type to handle_action_event() in acp_impl/events/shared_event_handler.py
  • Add -> None return type to unstreamed_event_handler() in acp_impl/events/token_streamer.py
  • Add type hint to usage parameter in _format_status_line() in acp_impl/events/utils.py

Related Issue

Addresses findings from #583

Testing

  • Linting passes (make lint)
  • Tests pass (make test - 1272 tests passed)

This PR was automatically generated by the Code Quality Report workflow.


🚀 Try this PR

uvx --python 3.12 git+https://github.com/OpenHands/OpenHands-CLI.git@fix/code-quality/add-missing-return-type-hints

Addresses item from code quality report.

- Add -> None return type to pause_runner_without_blocking() in conversation_runner.py
- Add -> None return type to __call__(), _handle_action_event(), _handle_message_event() in event.py
- Add -> None return type to handle_action_event() in shared_event_handler.py
- Add -> None return type to unstreamed_event_handler() in token_streamer.py
- Add type hint to usage parameter in _format_status_line() in utils.py

Addresses findings from #583

Co-authored-by: openhands <openhands@all-hands.dev>
@enyst
Copy link
Collaborator

enyst commented Mar 9, 2026

@OpenHands send an empty commit to start CI, then monitor it for some 5 mins to see if it passes; fix till green.

@enyst enyst enabled auto-merge (squash) March 9, 2026 09:35
@openhands-ai
Copy link

openhands-ai bot commented Mar 9, 2026

I'm on it! enyst can track my progress at all-hands.dev

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions
Copy link
Contributor Author

github-actions bot commented Mar 9, 2026

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands_cli/acp_impl/events
   event.py51688%75, 79, 125–126, 151–152
   shared_event_handler.py61690%120, 133, 177, 182, 184, 189
   token_streamer.py1241191%148, 160, 164, 167, 172, 174, 176, 178, 243, 250, 270
   utils.py83297%80, 84
openhands_cli/tui/core
   conversation_runner.py1033962%96–98, 105, 107, 118, 124, 150, 157–158, 161–163, 173, 181, 183–186, 194, 197–198, 202, 209, 213–214, 219, 221, 227–228, 233, 235, 237, 244, 247, 252, 254, 266–267
TOTAL664192886% 

Co-authored-by: openhands <openhands@all-hands.dev>
@enyst enyst merged commit 529b7e2 into main Mar 9, 2026
11 checks passed
@enyst enyst deleted the fix/code-quality/add-missing-return-type-hints branch March 9, 2026 09:48
@openhands-ai
Copy link

openhands-ai bot commented Mar 9, 2026

Final summary:

Since my last update, there have been no additional changes to make. The work is complete.

Checklist:

  • User request fully addressed
  • Empty commit was created and pushed to trigger CI
  • CI was monitored
  • The failing check was fixed with a minimal code change
  • The fix was pushed to the remote PR branch
  • Latest PR checks completed successfully

Conciseness check:

  • The only functional code change beyond the empty CI-trigger commit was the minimal pyright fix in openhands_cli/acp_impl/events/utils.py:
    • added TokenUsage import
    • changed _format_status_line(usage: object, ...) to _format_status_line(usage: TokenUsage, ...)
  • No extraneous files or unrelated code changes were introduced.

Final status:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants