mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Exclude build-all.py from main ruff check
This commit is contained in:
@@ -26,6 +26,7 @@ jobs:
|
|||||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
uv tool install ruff
|
uv tool install ruff
|
||||||
uv tool install black
|
uv tool install black
|
||||||
|
uv tool install poethepoet
|
||||||
|
|
||||||
# black doesn't catch all syntax errors, so we check them explicitly.
|
# black doesn't catch all syntax errors, so we check them explicitly.
|
||||||
- name: Check syntax errors
|
- name: Check syntax errors
|
||||||
@@ -40,15 +41,16 @@ jobs:
|
|||||||
- name: Black formatter
|
- name: Black formatter
|
||||||
id: black
|
id: black
|
||||||
run: |
|
run: |
|
||||||
uvx black --diff --check .
|
black --diff --check .
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Ruff check
|
- name: Ruff check
|
||||||
id: ruff
|
id: ruff
|
||||||
run: |
|
run: |
|
||||||
uvx ruff check
|
ERROR=0
|
||||||
# It's actually Python 3.6, but ruff only supports 3.7+, but it should do.
|
poe ruff-main || ERROR=1
|
||||||
uvx ruff check nix/build-all.py --target-version py37
|
poe ruff-old || ERROR=1
|
||||||
|
exit $ERROR
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Final check
|
- name: Final check
|
||||||
|
|||||||
@@ -18,8 +18,6 @@
|
|||||||
# #
|
# #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# ruff: noqa: UP035
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Example usage:
|
Example usage:
|
||||||
# Build all targets by default.
|
# Build all targets by default.
|
||||||
|
|||||||
@@ -62,3 +62,14 @@ ignore = [
|
|||||||
"UP031", # Replace % with .format
|
"UP031", # Replace % with .format
|
||||||
"UP032", # Replace .format with f-string
|
"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"]
|
||||||
|
|||||||
Reference in New Issue
Block a user