✨ Run Mypy linter on backend pull requests
This commit is contained in:
@@ -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 .
|
||||||
|
@@ -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']
|
||||||
|
Reference in New Issue
Block a user