From ffdd606ad0d79630cf8a59ef827586c0044ab711 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Mon, 6 Apr 2026 23:15:52 -0400 Subject: [PATCH 1/2] chore: fix ruff check --- .github/workflows/python_tests.yml | 18 +++++++++++++++--- pylib/gyp/simple_copy.py | 4 ++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index 6fa92e07..e0b16303 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -7,6 +7,21 @@ on: workflow_dispatch: jobs: + Python_lint: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.14"] + steps: + - uses: actions/checkout@v6 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + - name: Lint with ruff # See pyproject.toml for settings + uses: astral-sh/ruff-action@v3 + - run: ruff format --check --diff + Python_tests: runs-on: ${{ matrix.os }} strategy: @@ -35,9 +50,6 @@ jobs: python -m pip install --upgrade pip pip install --editable ".[dev]" - run: ./gyp -V && ./gyp --version && gyp -V && gyp --version - - name: Lint with ruff # See pyproject.toml for settings - uses: astral-sh/ruff-action@v3 - - run: ruff format --check --diff - name: Test with pytest # See pyproject.toml for settings run: pytest # - name: Run doctests with pytest diff --git a/pylib/gyp/simple_copy.py b/pylib/gyp/simple_copy.py index 8b026642..2b9100f3 100644 --- a/pylib/gyp/simple_copy.py +++ b/pylib/gyp/simple_copy.py @@ -24,8 +24,8 @@ def deepcopy(x): return _deepcopy_dispatch[type(x)](x) except KeyError: raise Error( - "Unsupported type %s for deepcopy. Use copy.deepcopy " - + "or expand simple_copy support." % type(x) + f"Unsupported type {type(x)} for deepcopy. Use copy.deepcopy " + + "or expand simple_copy support." ) From 5ab421c0bb88971c8eb79f099df97fba67c0db3c Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Tue, 7 Apr 2026 14:43:50 -0400 Subject: [PATCH 2/2] fixup! Co-authored-by: Christian Clauss --- .github/workflows/python_tests.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index e0b16303..12197732 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -14,10 +14,6 @@ jobs: python-version: ["3.14"] steps: - uses: actions/checkout@v6 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python-version }} - name: Lint with ruff # See pyproject.toml for settings uses: astral-sh/ruff-action@v3 - run: ruff format --check --diff