From 63cdbcb46ec81ad4de5eacd19375742e5a7386b8 Mon Sep 17 00:00:00 2001 From: Adrien Date: Sun, 11 Feb 2024 19:46:12 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Install=20dependencies=20before?= =?UTF-8?q?=20running=20the=20linters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.woodpecker/.lint.yaml | 11 +++++------ backend/pyproject.toml | 25 +++++++++++++++---------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/backend/.woodpecker/.lint.yaml b/backend/.woodpecker/.lint.yaml index 7c2a9a8..fbc15a1 100644 --- a/backend/.woodpecker/.lint.yaml +++ b/backend/.woodpecker/.lint.yaml @@ -10,12 +10,10 @@ steps: secrets: ["reviewdog_gitea_api_token", "gitea_address"] commands: | cd backend - env wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s latest - pip install ruff - ruff --output-format sarif . > /tmp/ruff.log - cat /tmp/ruff.log - cat /tmp/ruff.log | ./bin/reviewdog -f sarif -reporter gitea-pr-review + pip install poetry + poetry install --with=linters + ruff --output-format sarif . | ./bin/reviewdog -f sarif -reporter gitea-pr-review - name: mypy image: python:3.12-alpine @@ -24,5 +22,6 @@ steps: commands: | cd backend wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s latest - pip install mypy + pip install poetry + poetry install --with=linters mypy . | ./bin/reviewdog -f mypy -reporter gitea-pr-review diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 83b33f4..f7fc067 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -49,27 +49,32 @@ pydantic-settings = "^2.0.3" requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" + [tool.poetry.group.dev.dependencies] pylsp-mypy = "^0.6.2" -mccabe = "^0.7.0" -rope = "^1.3.0" python-lsp-black = "^1.2.1" -black = "^22.10.0" -types-aiofiles = "^22.1.0.2" wrapt = "^1.14.1" -pydocstyle = "^6.2.2" dill = "^0.3.6" python-lsp-ruff = "^1.0.5" python-lsp-server = "^1.7.1" -autopep8 = "^2.0.1" -pyflakes = "^3.0.1" -yapf = "^0.32.0" -whatthepatch = "^1.0.4" -mypy = "^1.0.0" icecream = "^2.1.3" + + +[tool.poetry.group.linters.dependencies] +autopep8 = "^2.0.1" +black = "^22.10.0" +mccabe = "^0.7.0" +mypy = "^1.0.0" +pydocstyle = "^6.2.2" +pyflakes = "^3.0.1" +rope = "^1.3.0" +ruff = "^0.2.1" +types-aiofiles = "^22.1.0.2" types-sqlalchemy-utils = "^1.0.1" types-pyyaml = "^6.0.12.9" types-tqdm = "^4.65.0.1" +whatthepatch = "^1.0.4" +yapf = "^0.32.0" [tool.mypy] plugins = "sqlalchemy.ext.mypy.plugin"