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
Example:
plugins: list[Annotated[Plugin, Union("<import>", discriminator_key="fqn", style=Union.FLAT)]]
Results in:
databind.core.converter.ConversionError: unsupported Union.style: FakeHint(flat, args=None) Trace: In "etc/nox-server.toml" $: TypeHint(nox_server.config.Config) .server: TypeHint(nox_server.config.ServerConfig) .plugins: TypeHint(typing.List[typing.Annotated[nox_server.plugin.Plugin, Union(members=ImportUnionMembers(), style=FakeHint(flat, args=None), discriminator_key='fqn', nesting_key=None)]]) [0]: TypeHint(typing.Annotated[nox_server.plugin.Plugin, Union(members=ImportUnionMembers(), style=FakeHint(flat, args=None), discriminator_key='fqn', nesting_key=None)])
A workaround is to move the annotation into a type alias that is evaluated immediately:
_DeserializablePlugin = Annotated[Plugin, Union("<import>", discriminator_key="fqn", style=Union.FLAT)] plugins: list[_DeserializePlugin]
The text was updated successfully, but these errors were encountered:
NiklasRosenstein
No branches or pull requests
Example:
Results in:
A workaround is to move the annotation into a type alias that is evaluated immediately:
The text was updated successfully, but these errors were encountered: