We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release in v0.2.5
The text was updated successfully, but these errors were encountered:
https://docs.pydantic.dev/latest/api/types/#pydantic.types.constr を見ていたら、 AnnotatedをうまくTypedDictに使えば、IDE側には今と同じ型情報を提供しながら文字列の長さなどのバリデーションが書けそう。やってみる
Sorry, something went wrong.
TypedDictをTypeAdapterでバリデーションするとTypedDictが返ってくるので、
class SelectOption(TypedDict): default: NotRequired[Annotated[bool, Field(default=False)]]
みたいなのを書いたときにバリデーションの後もindex accessをやると存在しない可能性があると怒られる。 Annotatedな型を全部切り出して、入力はTypedDictだが内部ではBaseModelで扱う方向にする?
v0.2.5は #54 の修正リリースになる. v0.3.0でのリリースに変更
実装が難航しているのでできた後の次のMinor Versionで導入する
No branches or pull requests
release in v0.2.5
The text was updated successfully, but these errors were encountered: