Please complete:
import sys; print(sys.version): 3.6.8 [GCC 7.4.0]import pydantic; print(pydantic.VERSION): 1.2a1Hello, I'm trying to create an instance of class Bar.
import pydantic
from typing import List
class Foo(pydantic.BaseModel):
foo: List[List[int]]
@pydantic.validator('foo')
def check_something(cls, value):
return value
class Bar(Foo):
pass
foo_ = [[0, 1]]
Foo(foo=foo_)
Bar(foo=foo_)
Output:
pydantic.error_wrappers.ValidationError: 1 validation error for Bar
foo -> 0
value is not a valid integer (type=type_error.integer)
There will be no error, If you remove validator.
Confirmed, thanks for reporting. Has been this way since v1.
I'll try and fix forthwith.
should be fixed via #1016, please let me know if that solves your problem. If so I'll release it as v1.1.1
Great! Thank you for the quick response!
Most helpful comment
should be fixed via #1016, please let me know if that solves your problem. If so I'll release it as
v1.1.1