]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
⬆ Upgrade internal testing dependencies: mypy to version 0.910, add newly needed...
authorArcLight_Slavik <arclight.leskiv@gmail.com>
Tue, 5 Oct 2021 08:40:08 +0000 (11:40 +0300)
committerGitHub <noreply@github.com>
Tue, 5 Oct 2021 08:40:08 +0000 (10:40 +0200)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
mypy.ini [deleted file]
pyproject.toml

diff --git a/mypy.ini b/mypy.ini
deleted file mode 100644 (file)
index e6a33cf..0000000
--- a/mypy.ini
+++ /dev/null
@@ -1,25 +0,0 @@
-[mypy]
-
-# --strict
-disallow_any_generics = True
-disallow_subclassing_any = True 
-disallow_untyped_calls = True 
-disallow_untyped_defs = True
-disallow_incomplete_defs = True 
-check_untyped_defs = True 
-disallow_untyped_decorators = True 
-no_implicit_optional = True
-warn_redundant_casts = True 
-warn_unused_ignores = True
-warn_return_any = True 
-implicit_reexport = False
-strict_equality = True
-# --strict end
-
-[mypy-fastapi.concurrency]
-warn_unused_ignores = False
-ignore_missing_imports = True
-
-[mypy-fastapi.tests.*]
-ignore_missing_imports = True
-check_untyped_defs = True 
index f48d034b395284c75a2400198a7a120fa3a21e71..7c986dbd72504d731ce78fd6dec1752be4f1b49d 100644 (file)
@@ -47,7 +47,7 @@ test = [
     "pytest >=6.2.4,<7.0.0",
     "pytest-cov >=2.12.0,<3.0.0",
     "pytest-asyncio >=0.14.0,<0.15.0",
-    "mypy ==0.812",
+    "mypy ==0.910",
     "flake8 >=3.8.3,<4.0.0",
     "black ==20.8b1",
     "isort >=5.0.6,<6.0.0",
@@ -63,7 +63,12 @@ test = [
     "async_generator >=1.10,<2.0.0",
     "python-multipart >=0.0.5,<0.0.6",
     "aiofiles >=0.5.0,<0.6.0",
-    "flask >=1.1.2,<2.0.0"
+    "flask >=1.1.2,<2.0.0",
+
+    # types
+    "types-ujson ==0.1.1",
+    "types-orjson ==3.6.0",
+    "types-dataclasses ==0.1.7; python_version<'3.7'",
 ]
 doc = [
     "mkdocs >=1.1.2,<2.0.0",
@@ -101,6 +106,33 @@ all = [
 profile = "black"
 known_third_party = ["fastapi", "pydantic", "starlette"]
 
+[tool.mypy]
+# --strict
+disallow_any_generics = true
+disallow_subclassing_any = true
+disallow_untyped_calls = true
+disallow_untyped_defs = true
+disallow_incomplete_defs = true
+check_untyped_defs = true
+disallow_untyped_decorators = true
+no_implicit_optional = true
+warn_redundant_casts = true
+warn_unused_ignores = true
+warn_return_any = true
+implicit_reexport = false
+strict_equality = true
+# --strict end
+
+[[tool.mypy.overrides]]
+module = "fastapi.concurrency"
+warn_unused_ignores = false
+ignore_missing_imports = true
+
+[[tool.mypy.overrides]]
+module = "fastapi.tests.*"
+ignore_missing_imports = true
+check_untyped_defs = true
+
 [tool.pytest.ini_options]
 addopts = [
   "--strict-config",