From 3b82b63f278524b62c315e4b86bbd17de70cc13b Mon Sep 17 00:00:00 2001 From: Artem Denisov Date: Mon, 11 Aug 2025 00:52:38 +0200 Subject: [PATCH 1/2] style: specify parametrs for linter job --- .github/workflows/lint.yml | 8 ++++---- .vscode/settings.json | 0 pyproject.toml | 2 +- src/utils.py | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0783647..444c916 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,11 +18,11 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' cache: 'pip' - name: Install Ruff - run: pip install ruff + run: pip install ruff==0.12.0 - name: Ruff (lint) - run: ruff check . --output-format=github + run: ruff check . --output-format=github --no-cache - name: Ruff (format check) - run: ruff format --check . + run: ruff format --check . --config pyproject.toml --no-cache diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index e69de29..0000000 diff --git a/pyproject.toml b/pyproject.toml index 00d199b..60b6e3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ dependencies = [ ] [tool.ruff] -target-version = "py312" +target-version = "py313" line-length = 100 src = ["src"] extend-exclude = ["venv", ".venv", "build", "dist", "deploy"] diff --git a/src/utils.py b/src/utils.py index 78a1de4..37ae395 100644 --- a/src/utils.py +++ b/src/utils.py @@ -633,11 +633,11 @@ def get_container_log_data(self, container_id: str, log_name: str) -> list: return cursor.fetchone() def get_process_log_download_data( - self, - endpoint_id: int, - supervisor_name: str, - process_name: str, - log_name: str + self, + endpoint_id: int, + supervisor_name: str, + process_name: str, + log_name: str ) -> tuple[str, str, str]: platform = self.get_platform_data(endpoint_id) @@ -650,11 +650,11 @@ def get_process_log_download_data( return platform_host, platform_user, log_path+log_name def get_container_log_download_data( - self, - endpoint_id: int, - container_name: str, - log_name: str - ) -> tuple[str, str, str]: + self, + endpoint_id: int, + container_name: str, + log_name: str + ) -> tuple[str, str, str]: platform = self.get_platform_data(endpoint_id) platform_host = platform[2] From 5e7c0af1164e469ba598b32760efffa171499ba9 Mon Sep 17 00:00:00 2001 From: Artem Denisov Date: Mon, 11 Aug 2025 01:03:42 +0200 Subject: [PATCH 2/2] style: updating lint.yml --- .github/workflows/lint.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 444c916..7d1c5b4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,18 +11,23 @@ concurrency: group: lint-${{ github.ref }} cancel-in-progress: true +permissions: + contents: read + jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.13' - cache: 'pip' - - name: Install Ruff - run: pip install ruff==0.12.0 + - name: Ruff (lint) - run: ruff check . --output-format=github --no-cache + uses: astral-sh/ruff-action@v3 + with: + version: 0.12.0 + args: check . --config pyproject.toml --output-format=github --no-cache + - name: Ruff (format check) - run: ruff format --check . --config pyproject.toml --no-cache + uses: astral-sh/ruff-action@v3 + with: + version: 0.12.0 + args: format --check . --config pyproject.toml --no-cache