Skip to content

fix(types): add TypedDict for API responses - #821

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

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

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds UserSettingsResponse and UserDataResponse TypedDicts for improved type safety and IDE support in the API client.

Changes

  • Added UserSettingsResponse TypedDict with fields: llm_model, llm_base_url, agent, language, llm_api_key_set, agent_settings
  • Added UserDataResponse TypedDict with fields: llm_api_key, settings
  • Updated get_user_settings() return type to UserSettingsResponse
  • Updated _print_settings_summary() parameter type to UserSettingsResponse
  • Updated fetch_user_data_after_oauth() return type to UserDataResponse

Related Issue

Addresses findings from #819 (Low-Hanging Fruit item #3)

Testing

  • Linting passes (make lint)
  • Tests pass (make test)

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

This message was generated by an AI agent (OpenHands) on behalf of the user.

Adds UserSettingsResponse and UserDataResponse TypedDicts for improved
type safety and IDE support in auth/api_client.py. This replaces generic
dict[str, Any] return types with structured TypedDict definitions.

Addresses item from code quality report.

Closes #819

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