mirror of
				https://github.com/fastapi-users/fastapi-users.git
				synced 2025-11-04 14:45:50 +08:00 
			
		
		
		
	Setup Hatch matrix to support Pydantic V1 and V2
This commit is contained in:
		@ -73,6 +73,15 @@ dependencies = [
 | 
				
			|||||||
    "ruff",
 | 
					    "ruff",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[tool.hatch.envs.default.matrix]]
 | 
				
			||||||
 | 
					pydantic = ["v1", "v2"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[tool.hatch.envs.default.overrides]
 | 
				
			||||||
 | 
					matrix.pydantic.extra-dependencies = [
 | 
				
			||||||
 | 
					  {value = "pydantic<2.0", if = ["v1"]},
 | 
				
			||||||
 | 
					  {value = "pydantic>=2.0", if = ["v2"]},
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[tool.hatch.envs.default.scripts]
 | 
					[tool.hatch.envs.default.scripts]
 | 
				
			||||||
test = "pytest --cov=fastapi_users/ --cov-report=term-missing --cov-fail-under=100"
 | 
					test = "pytest --cov=fastapi_users/ --cov-report=term-missing --cov-fail-under=100"
 | 
				
			||||||
test-cov-xml = "pytest --cov=fastapi_users/ --cov-report=xml --cov-fail-under=100"
 | 
					test-cov-xml = "pytest --cov=fastapi_users/ --cov-report=xml --cov-fail-under=100"
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user