Replies: 2 comments 1 reply
-
@erictraut is this something you can advise on? Or do you think I should take this up with the pydantic folks? |
Beta Was this translation helpful? Give feedback.
1 reply
-
@mjperrone this is a limitation of the from pydantic import BaseModel
class Model(BaseModel):
foo: int
Model(foo='1') # type error, fine at runtime
#> Model(foo=1) You can ignore the error or alternatively use the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to instantiate a pydantic model which contains a field that is an
AnyUrl
. The few ways I've tried both yield pyright errorsreportArgumentType
. Is there a correct way to do this?Here is a minimal repro. This uses pydantic version
1.10.15
and pyright version1.1.374
.Beta Was this translation helpful? Give feedback.
All reactions