mirror of
https://github.com/fastapi/fastapi.git
synced 2026-03-31 21:21:56 -04:00
✨ Improve type annotations, add support for mypy --strict, internally and for external packages (#2547)
This commit is contained in:
committed by
GitHub
parent
4fdcdf341c
commit
fdb6c9ccc5
@@ -71,7 +71,7 @@ class ModelWithAlias(BaseModel):
|
||||
|
||||
|
||||
class ModelWithDefault(BaseModel):
|
||||
foo: str = ...
|
||||
foo: str = ... # type: ignore
|
||||
bar: str = "bar"
|
||||
bla: str = "bla"
|
||||
|
||||
@@ -88,7 +88,7 @@ def fixture_model_with_path(request):
|
||||
arbitrary_types_allowed = True
|
||||
|
||||
ModelWithPath = create_model(
|
||||
"ModelWithPath", path=(request.param, ...), __config__=Config
|
||||
"ModelWithPath", path=(request.param, ...), __config__=Config # type: ignore
|
||||
)
|
||||
return ModelWithPath(path=request.param("/foo", "bar"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user