Skip to content

Commit ff83fdc

Browse files
committed
Pre-commit: Fix applying ruff to SCsub files
Also ignore iOS template dummy.h file for header guards check. Update ruff to 0.8.4 while at it.
1 parent 99a8ab7 commit ff83fdc

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.pre-commit-config.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,15 @@ repos:
5050
stages: [manual] # Not automatically triggered, invoked via `pre-commit run --hook-stage manual clang-tidy`
5151

5252
- repo: https://github.com/astral-sh/ruff-pre-commit
53-
rev: v0.7.3
53+
rev: v0.8.4
5454
hooks:
5555
- id: ruff
5656
args: [--fix]
57+
files: (\.py|SConstruct|SCsub)$
58+
types_or: [text]
5759
- id: ruff-format
60+
files: (\.py|SConstruct|SCsub)$
61+
types_or: [text]
5862

5963
- repo: https://github.com/pre-commit/mirrors-mypy
6064
rev: v1.13.0
@@ -170,7 +174,7 @@ repos:
170174
language: python
171175
entry: python misc/scripts/header_guards.py
172176
files: \.(h|hpp|hh|hxx)$
173-
exclude: ^.*/(thread|platform_config|platform_gl)\.h$
177+
exclude: ^.*/(dummy|thread|platform_config|platform_gl)\.h$
174178

175179
- id: file-format
176180
name: file-format

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ python_version = "3.8"
1414

1515
[tool.ruff]
1616
extend-exclude = ["thirdparty"]
17-
extend-include = ["SConstruct", "SCsub"]
17+
extend-include = ["*SConstruct", "*SCsub"]
1818
line-length = 120
1919
target-version = "py38"
2020

scene/resources/SCsub

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ thirdparty_obj = []
1010
thirdparty_dir = "#thirdparty/misc/"
1111
thirdparty_sources = [
1212
"mikktspace.c",
13-
"qoa.c"
13+
"qoa.c",
1414
]
1515

1616
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]

0 commit comments

Comments
 (0)