Skip to content

fix(critic): add CriticFeature TypedDict for improved type safety - #817

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
fix/code-quality/critic-feature-typeddict
Open

github-actions[bot] wants to merge 1 commit into
mainfrom
fix/code-quality/critic-feature-typeddict

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Add TypedDict definition for critic feature structure used in refinement logic. This provides better IDE support and catches potential type mismatches at type-check time.

Changes

  • Add CriticFeature TypedDict with name, display_name, and probability fields
  • Update function signatures to use CriticFeature instead of dict[str, Any]
  • Export CriticFeature from the critic module __init__.py

Related Issue

Addresses findings from #816

Testing

  • Linting passes (make lint)
  • Tests pass (make test - 1361 tests)
  • Specific refinement tests pass (tests/tui/utils/critic/test_refinement.py - 28 tests)

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

This PR was created by an AI agent (OpenHands) on behalf of the maintainers.

Add TypedDict definition for critic feature structure used in refinement
logic. This provides better IDE support and catches potential type
mismatches at type-check time.

Changes:
- Add CriticFeature TypedDict with name, display_name, and probability fields
- Update function signatures to use CriticFeature instead of dict[str, Any]
- Export CriticFeature from the critic module __init__.py

Addresses item from code quality report.

Closes #816

Co-authored-by: openhands <openhands@all-hands.dev>
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.

0 participants