diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0783647..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.12' - cache: 'pip' - - name: Install Ruff - run: pip install ruff + - name: Ruff (lint) - run: ruff check . --output-format=github + 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 . + uses: astral-sh/ruff-action@v3 + with: + version: 0.12.0 + args: 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]