Skip to content

Commit d2a633d

Browse files
committed
Setup Hatch matrix to support Pydantic V1 and V2
1 parent 69f96c1 commit d2a633d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ dependencies = [
7373
"ruff",
7474
]
7575

76+
[[tool.hatch.envs.default.matrix]]
77+
pydantic = ["v1", "v2"]
78+
79+
[tool.hatch.envs.default.overrides]
80+
matrix.pydantic.extra-dependencies = [
81+
{value = "pydantic<2.0", if = ["v1"]},
82+
{value = "pydantic>=2.0", if = ["v2"]},
83+
]
84+
7685
[tool.hatch.envs.default.scripts]
7786
test = "pytest --cov=fastapi_users/ --cov-report=term-missing --cov-fail-under=100"
7887
test-cov-xml = "pytest --cov=fastapi_users/ --cov-report=xml --cov-fail-under=100"

0 commit comments

Comments
 (0)