New issue
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
fix: strictbytes-max-length #4383
fix: strictbytes-max-length #4383
Conversation
please review |
u: StrictBytes = Field(..., max_length=5) | ||
|
||
with pytest.raises(ValidationError, match='byte type expected'): | ||
Model(u=123) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a test with a byte (to make strictness pass) with
- short length to raise ValidationError
- long length to pass
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, What do you think?
please review |
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@PrettyWood merge if you're happy.
Change Summary
Related issue number
fix #4380
Checklist
changes/<pull request or issue id>-<github username>.md
file added describing change(see changes/README.md for details)