From 42f562416da20479b322fe7a8b114ebb25a50c97 Mon Sep 17 00:00:00 2001 From: "sundar.shankar" Date: Mon, 13 Jan 2025 21:27:44 +0530 Subject: [PATCH 1/4] fmt patch --- tests/unit/no_cheat.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unit/no_cheat.py b/tests/unit/no_cheat.py index e0979c1..c24cd23 100644 --- a/tests/unit/no_cheat.py +++ b/tests/unit/no_cheat.py @@ -1,11 +1,11 @@ import sys from pathlib import Path -DISABLE_TAG = '# pylint: disable=' +DISABLE_TAG = "# pylint: disable=" def no_cheat(diff_text: str) -> str: - lines = diff_text.split('\n') + lines = diff_text.split("\n") removed: dict[str, int] = {} added: dict[str, int] = {} for line in lines: @@ -14,9 +14,9 @@ def no_cheat(diff_text: str) -> str: idx = line.find(DISABLE_TAG) if idx < 0: continue - codes = line[idx + len(DISABLE_TAG) :].split(',') + codes = line[idx + len(DISABLE_TAG) :].split(",") for code in codes: - code = code.strip().strip('\n').strip('"').strip("'") + code = code.strip().strip("\n").strip('"').strip("'") if line.startswith("-"): removed[code] = removed.get(code, 0) + 1 continue @@ -26,7 +26,7 @@ def no_cheat(diff_text: str) -> str: count -= removed.get(code, 0) if count > 0: results.append(f"Do not cheat the linter: found {count} additional {DISABLE_TAG}{code}") - return '\n'.join(results) + return "\n".join(results) if __name__ == "__main__": From 7d0555c2acc421b7d440be0f1ad2330a245fda9a Mon Sep 17 00:00:00 2001 From: "sundar.shankar" Date: Mon, 13 Jan 2025 21:54:55 +0530 Subject: [PATCH 2/4] fmt patch --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 6c59df2..4cf3009 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -15,7 +15,7 @@ on: - main env: - HATCH_VERSION: 1.9.4 + HATCH_VERSION: 1.13.0 jobs: ci: From 258fd90c026caf1acbb929ce22c46f8d64362580 Mon Sep 17 00:00:00 2001 From: "sundar.shankar" Date: Mon, 13 Jan 2025 22:00:12 +0530 Subject: [PATCH 3/4] fmt patch --- .github/workflows/push.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 4cf3009..6c59df2 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -15,7 +15,7 @@ on: - main env: - HATCH_VERSION: 1.13.0 + HATCH_VERSION: 1.9.4 jobs: ci: diff --git a/pyproject.toml b/pyproject.toml index d0fc7e1..49ec2cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ fmt = ["isort .", "ruff format", "ruff check . --fix", "mypy .", - "pylint --output-format=colorized -j 0 src"] + "pylint --version"] verify = ["isort . --check-only", "ruff format --check --diff", "ruff check .", From 9d42bd220f9a3003b405f39c24d8925b000344bf Mon Sep 17 00:00:00 2001 From: "sundar.shankar" Date: Mon, 13 Jan 2025 22:04:18 +0530 Subject: [PATCH 4/4] fmt patch --- .github/workflows/push.yml | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 6c59df2..5ff14fa 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -54,6 +54,12 @@ jobs: - name: Checkout uses: actions/checkout@v4.2.2 + - name: Install Python + uses: actions/setup-python@v5 + with: + # Since 3.10 is the development version for the project + python-version: '3.10' + - name: Install hatch run: pip install hatch==$HATCH_VERSION diff --git a/pyproject.toml b/pyproject.toml index 49ec2cb..d0fc7e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ fmt = ["isort .", "ruff format", "ruff check . --fix", "mypy .", - "pylint --version"] + "pylint --output-format=colorized -j 0 src"] verify = ["isort . --check-only", "ruff format --check --diff", "ruff check .",