Skip to content

Commit b5e41fe

Browse files
Add EmailStr and ValidationError to pydantic shim (#2112)
1 parent cd28efe commit b5e41fe

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

elementary/utils/pydantic_shim.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,21 @@
1111
if pydantic_major == "1":
1212
from pydantic import ( # type: ignore # noqa
1313
BaseModel,
14+
EmailStr,
1415
Extra,
1516
Field,
17+
ValidationError,
1618
create_model,
1719
root_validator,
1820
validator,
1921
)
2022
elif pydantic_major == "2":
2123
from pydantic.v1 import ( # type: ignore # noqa
2224
BaseModel,
25+
EmailStr,
2326
Extra,
2427
Field,
28+
ValidationError,
2529
create_model,
2630
root_validator,
2731
validator,

0 commit comments

Comments
 (0)