Add pyright strict type checking

This commit is contained in:
Martijn Pieters
2023-05-09 17:33:07 +01:00
parent ad1eae2b4b
commit 0763cd7b95
9 changed files with 124 additions and 61 deletions

View File

@@ -22,7 +22,6 @@ 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\"" }
@@ -36,6 +35,8 @@ coverage = "^6.5.0"
httpx = "*"
mypy = "^1.2.0"
types-redis = "^4.5.4.2"
pyright = "^1.1.306"
types-aiobotocore = { extras = ["dynamodb"], version = "^2.5.0.post2" }
[build-system]
requires = ["poetry>=0.12"]
@@ -44,8 +45,8 @@ build-backend = "poetry.masonry.api"
[tool.poetry.extras]
redis = ["redis"]
memcache = ["aiomcache"]
dynamodb = ["aiobotocore", "types-aiobotocore"]
all = ["redis", "aiomcache", "aiobotocore", "types-aiobotocore"]
dynamodb = ["aiobotocore"]
all = ["redis", "aiomcache", "aiobotocore"]
[tool.black]
line-length = 100
@@ -73,3 +74,8 @@ strict_concatenate = true
[[tool.mypy.overrides]]
module = "examples.*.main"
ignore_errors = true
[tool.pyright]
include = ["fastapi_cache", "tests", "examples"]
strict = ["fastapi_cache", "tests"]
pythonVersion = "3.7"