Full mypy --strict type checking pass

This commit is contained in:
Martijn Pieters
2023-05-09 17:08:32 +01:00
parent e92604802e
commit 941cd044c7
10 changed files with 693 additions and 40 deletions

View File

@@ -22,6 +22,7 @@ redis = { version = "^4.2.0rc1", optional = true }
aiomcache = { version = "*", optional = true }
pendulum = "*"
aiobotocore = { version = "^1.4.1", optional = true }
types-aiobotocore = { extras = ["dynamodb"], version = "^2.5.0.post2", optional = true }
typing-extensions = { version = ">=4.1.0" }
aiohttp = { version = ">=3.8.3", markers = "python_version >= \"3.11\"" }
@@ -33,6 +34,8 @@ pytest = "*"
requests = "*"
coverage = "^6.5.0"
httpx = "*"
mypy = "^1.2.0"
types-redis = "^4.5.4.2"
[build-system]
requires = ["poetry>=0.12"]
@@ -41,9 +44,31 @@ build-backend = "poetry.masonry.api"
[tool.poetry.extras]
redis = ["redis"]
memcache = ["aiomcache"]
dynamodb = ["aiobotocore"]
all = ["redis", "aiomcache", "aiobotocore"]
dynamodb = ["aiobotocore", "types-aiobotocore"]
all = ["redis", "aiomcache", "aiobotocore", "types-aiobotocore"]
[tool.black]
line-length = 100
target-version = ['py36', 'py37', 'py38', 'py39']
[tool.mypy]
files = ["fastapi_cache", "examples", "tests"]
# equivalent of --strict
warn_unused_configs = true
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
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
no_implicit_reexport = true
strict_equality = true
strict_concatenate = true
[[tool.mypy.overrides]]
module = "examples.*.main"
ignore_errors = true