Compare commits

...

1 Commits

Author SHA1 Message Date
Andrej730 f8326feae3 Exclude build-all.py from main ruff check 2025-10-28 18:14:13 +05:00
3 changed files with 17 additions and 6 deletions
+6 -4
View File
@@ -26,6 +26,7 @@ jobs:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install ruff
uv tool install black
uv tool install poethepoet
# black doesn't catch all syntax errors, so we check them explicitly.
- name: Check syntax errors
@@ -40,15 +41,16 @@ jobs:
- name: Black formatter
id: black
run: |
uvx black --diff --check .
black --diff --check .
continue-on-error: true
- name: Ruff check
id: ruff
run: |
uvx ruff check
# It's actually Python 3.6, but ruff only supports 3.7+, but it should do.
uvx ruff check nix/build-all.py --target-version py37
ERROR=0
poe ruff-main || ERROR=1
poe ruff-old || ERROR=1
exit $ERROR
continue-on-error: true
- name: Final check
-2
View File
@@ -18,8 +18,6 @@
# #
###############################################################################
# ruff: noqa: UP035
"""
Example usage:
# Build all targets by default.
+11
View File
@@ -62,3 +62,14 @@ ignore = [
"UP031", # Replace % with .format
"UP032", # Replace .format with f-string
]
[tool.poe.tasks]
ruff-main = "ruff check --extend-exclude nix/build-all.py"
# It's actually Python 3.6, but ruff only supports 3.7+, but it should do.
ruff-old = "ruff check nix/build-all.py --target-version py37"
ruff.sequence = ["ruff-main", "ruff-old"]
black = "black ."
format.sequence = ["black", "ruff-main", "ruff-old"]