Closed yurigba closed 1 year ago
I wanted to use Pydantic validators for making data types. However, it does not work properly in Affine 2.3.1:
from pydantic import BaseModel from affine import identity class Transform(BaseModel): transform: Affine Transform(transform=identity)
This returns the following error:
--------------------------------------------------------------------------- ValidationError Traceback (most recent call last) <ipython-input-45-0e11ed9741f8> in <cell line: 1>() ----> 1 Transform(transform=identity) ~/anaconda3/envs/mapOsirisv2/lib/python3.10/site-packages/pydantic/main.cpython-310-x86_64-linux-gnu.so in pydantic.main.BaseModel.__init__() ValidationError: 1 validation error for Transform transform Affine.__new__() got an unexpected keyword argument 'g' (type=type_error)
This is similar to issue #79 .
@yurigba can you try out the code in PR #92?
I believe this has been solved.
I wanted to use Pydantic validators for making data types. However, it does not work properly in Affine 2.3.1:
This returns the following error:
This is similar to issue #79 .