Skip to content

Commit 2a91bf0

Browse files
committed
Add Ruff F401 to Tools/
1 parent 5b7971d commit 2a91bf0

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ repos:
2323
name: Run Ruff (lint) on Platforms/WASI/
2424
args: [--exit-non-zero-on-fix, --config=Platforms/WASI/.ruff.toml]
2525
files: ^Platforms/WASI/
26+
- id: ruff-check
27+
name: Run Ruff (lint) on Tools/
28+
args: [--exit-non-zero-on-fix]
29+
files: ^Tools/
30+
exclude: ^Tools/(build|clinic|i18n|peg_generator|wasm)/
2631
- id: ruff-check
2732
name: Run Ruff (lint) on Tools/build/
2833
args: [--exit-non-zero-on-fix, --config=Tools/build/.ruff.toml]

Tools/.ruff.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
extend = "../.ruff.toml" # Inherit the project-wide settings
2+
3+
[per-file-target-version]
4+
"jit/example_trace_dump.py" = "py312" # Reused-quote f-strings (PEP 701)
5+
6+
[lint]
7+
select = [
8+
"F401", # Unused import
9+
]
10+
11+
[lint.per-file-ignores]
12+
"c-analyzer/c_parser/__init__.py" = ["F401"] # Re-exports from submodules
13+
"c-analyzer/c_parser/preprocessor/__init__.py" = ["F401"] # Re-exports from submodules
14+
"c-analyzer/c_parser/preprocessor/common.py" = ["F401"] # Re-exported by preprocessor/__init__.py

0 commit comments

Comments
 (0)