Repository navigation
fix(python): infer schemas for bare dict and list annotations - #2317
Conversation
|
@1aifanatic is attempting to deploy a commit to the motia Team on Vercel. A member of the Team first needs to authorize it. |
License agreement recorded@1aifanatic, your agreement has been recorded and you have been added to contributors.md. All future PRs from your account will pass this check automatically. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Hey @1aifanatic, thanks for the contribution. Before we move on, can you accept the |
What
Recognize bare
dictandlistannotations when generating Python function schemas, including nullable forms. The schema keeps the existing behavior for parameterized containers.Why
Fixes #2194.
typing.get_origin(dict)andtyping.get_origin(list)returnNone, so these annotations previously produced no schema.Notes
ruff checkandruff format --checkpassed for the changed files.Summary by CodeRabbit
listanddictannotations are now represented correctly in generated schemas, including optional forms. Request and response schemas also handle these annotations correctly.