-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I was going through and updating internal typing used in the library, and ran across this issue:
type MyType = uint8
class Test(Structured):
a: MyTypeHere a won't be detected as a serializable type. The same thing doesn't happen with the older syntax of MyType: TypeAlias = uint8, as it is actually assigned the value of uint8. With the new syntax however, a TypeAlias object is created instead (technically, a typing.TypeAliasType object).
So we'll need to handle this correctly. Some relevant information stored on the TypAliasType object that will be needed:
__value__holds the assigned value of the TypeAlias, this is what will be needed to be examined for serializability checks__name__holds the name of the TypeAlias, probably not needed__type_params__holds type parameters (typevars, typevartuples) for generic TypeAlias's.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request