Replies: 1 comment 9 replies
-
So, a few things. First - you can check if a class is a Second - you should actually use a Struct as a base class. Finally, if you want to enforce constraints in msgspec you need to use it's You can ask for guidance in their github. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I tried creating a custom factory for msgspec and I parsed the constraints and passed them in via the
FieldMeta.from_type
method, but for some reason when the type is bytes, the constraint is not respected. A sample reproduction:If the type is
str
, this is not reproduced. Am I doing something wrong or is this a bug?Beta Was this translation helpful? Give feedback.
All reactions