Skip to content

Conversation

@tselepakis
Copy link
Contributor

@tselepakis tselepakis commented Oct 20, 2025

Provide field metadata utility function to properly handle Annotated types.

The issue was mentioned here.

@tselepakis
Copy link
Contributor Author

tselepakis commented Oct 23, 2025

@Viicos let's continue the discussion about this here if you like. I had a quick look on the tests and I wasn't able to find any relevant test that we have nested annotations with NoDecode. Although I understand your concern regarding nesting, I am not sure I can replicate the issue. Do we actually care about the underling structure? I think we only need to identify that this field should not be decoded.

I tried something like this and it seems to work.

IntOrStr = TypeAliasType('IntOrStr', int | str)
A = TypeAliasType('A', Annotated[list[IntOrStr], NoDecode])

this also works

ListOrTuple = TypeAliasType('ListOrTuple', list[str] | tuple[str])
A = TypeAliasType('A', Annotated[ListOrTuple, NoDecode])

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.

1 participant