Skip to content

Conversation

@github-actions
Copy link
Contributor

Summary

This PR resolves mypy arg-type errors in console tests by ensuring message dict literals are recognized as the UIMessage TypedDict.

Implementation Details

  • Imported UIMessage from oai_coding_agent.console.state in tests/test_rendering.py and tests/test_slash_commands.py.
  • Annotated message dict literals (msg) as UIMessage in the affected test functions.

Assumptions

  • Using direct TypedDict annotation is preferred over cast() or other workarounds.
  • Other mypy errors in unrelated tests will be addressed in separate issues.

Testing

  • uv run pytest ✅ All console tests continue to pass.
  • uv run mypy . ✅ No arg-type errors in tests/test_rendering.py or tests/test_slash_commands.py.

Considerations

  • Alternative approaches considered: using typing.cast to cast dicts to UIMessage, but direct annotation is more concise and clear.

This PR focuses solely on console tests; other test fixes will follow.

@github-actions github-actions bot added the oai label May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants