Clean up pyproject.toml

- remove usused dependency
- use poetry syntax to specify minimal python versions
- simplify path selections in mypy and pyright
- correct pytest section name
This commit is contained in:
Martijn Pieters
2023-05-16 12:40:25 +01:00
parent 637c825dc8
commit d2947d01b5
2 changed files with 33 additions and 17 deletions

View File

@@ -23,17 +23,16 @@ aiomcache = { version = "*", optional = true }
pendulum = "*"
aiobotocore = { version = "^1.4.1", optional = true }
typing-extensions = { version = ">=4.1.0" }
aiohttp = { version = ">=3.8.3", markers = "python_version >= \"3.11\"" }
[tool.poetry.group.linting]
optional = true
[tool.poetry.group.linting.dependencies]
mypy = { version = "^1.2.0", markers = "python_version >= \"3.10\"" }
pyright = { version = "^1.1.306", markers="python_version >= \"3.10\"" }
types-aiobotocore = { extras = ["dynamodb"], version = "^2.5.0.post2", markers = "python_version >= \"3.10\"" }
types-redis = { version = "^4.5.4.2", markers = "python_version >= \"3.10\"" }
ruff = { version = "^0.0.267", markers = "python_version >= \"3.10\"" }
mypy = { version = "^1.2.0", python = "^3.10" }
pyright = { version = "^1.1.306", python = "^3.10" }
types-aiobotocore = { extras = ["dynamodb"], version = "^2.5.0.post2", python = "^3.10" }
types-redis = { version = "^4.5.4.2", python = "^3.10" }
ruff = { version = "^0.0.267", python = "^3.10" }
[tool.poetry.group.dev.dependencies]
pytest = "*"
@@ -49,7 +48,7 @@ dynamodb = ["aiobotocore"]
all = ["redis", "aiomcache", "aiobotocore"]
[tool.mypy]
files = ["fastapi_cache", "examples", "tests"]
files = ["."]
python_version = "3.7"
# equivalent of --strict
warn_unused_configs = true
@@ -72,11 +71,10 @@ module = "examples.*.main"
ignore_errors = true
[tool.pyright]
include = ["fastapi_cache", "tests", "examples"]
strict = ["fastapi_cache", "tests"]
pythonVersion = "3.7"
[tool.pytest]
[tool.pytest.ini_options]
addopts = "-p no:warnings"
[tool.ruff]