Improve type annotations, add support for mypy --strict, internally and for external packages (#2547)

This commit is contained in:
Sebastián Ramírez
2020-12-20 19:50:00 +01:00
committed by GitHub
parent 4fdcdf341c
commit fdb6c9ccc5
43 changed files with 314 additions and 244 deletions

View File

@@ -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"))