Run Mypy linter on backend pull requests
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/pr/lint Pipeline failed

This commit is contained in:
2024-02-11 17:40:06 +01:00
parent ff808e7c8f
commit c8732a0375
2 changed files with 10 additions and 3 deletions

View File

@@ -3,7 +3,13 @@ steps:
image: python:3.12-alpine image: python:3.12-alpine
commands: commands:
- pip install ruff - pip install ruff
- ruff . --format github - ruff --output-format github .
when: when:
- branch: - branch:
exclude: [master, develop, release/*] exclude: [master, develop, release/*]
- name: mypy
image: python:3.12-alpine
commands: |
pip install mypy
mypy .

View File

@@ -24,6 +24,7 @@ psycopg = "^3.1.9"
pyyaml = "^6.0" pyyaml = "^6.0"
fastapi-cache2 = {extras = ["redis"], version = "^0.2.1"} fastapi-cache2 = {extras = ["redis"], version = "^0.2.1"}
pydantic-settings = "^2.0.3" pydantic-settings = "^2.0.3"
ruff = "^0.2.1"
[tool.poetry.group.db_updater.dependencies] [tool.poetry.group.db_updater.dependencies]
aiofiles = "^22.1.0" aiofiles = "^22.1.0"
@@ -48,8 +49,6 @@ pydantic-settings = "^2.0.3"
requires = ["poetry-core"] requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api" build-backend = "poetry.core.masonry.api"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
pylsp-mypy = "^0.6.2" pylsp-mypy = "^0.6.2"
mccabe = "^0.7.0" mccabe = "^0.7.0"
@@ -74,6 +73,8 @@ types-tqdm = "^4.65.0.1"
[tool.mypy] [tool.mypy]
plugins = "sqlalchemy.ext.mypy.plugin" plugins = "sqlalchemy.ext.mypy.plugin"
exclude = ['docker', 'docs']
strict = true
[tool.black] [tool.black]
target-version = ['py311'] target-version = ['py311']