Skip to content

Commit c067295

Browse files
authored
Refactor ruff.toml configuration and comments
Updated linting rules and comments in ruff.toml for clarity.
1 parent 09db0b3 commit c067295

1 file changed

Lines changed: 11 additions & 17 deletions

File tree

ruff.toml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,31 @@
11
# Ruff configuration for AST-Healer
2-
# https://docs.astral.sh/ruff/configuration/
3-
42
target-version = "py311"
53
line-length = 100
64

75
[lint]
8-
# Enforce: pycodestyle errors (E), pyflakes (F), warnings (W)
96
select = ["E", "F", "W"]
107

118
ignore = [
12-
# Line too long — handled by formatter, not linter
13-
"E501",
14-
# Do not use bare `except` — acceptable in subprocess error-handling paths
15-
"E722",
16-
# Module level import not at top — triggered by conditional imports in main.py
17-
"E402",
18-
# Ambiguous variable name (e.g. `l`, `O`) — not relevant here
19-
"E741",
20-
# Local variable is assigned but never used — triggers on intentional _ patterns
21-
"F841",
9+
"E501", # line too long — formatter concern, not linter
10+
"E722", # bare except — used intentionally in subprocess error paths
11+
"E402", # module-level import not at top — used in conftest.py intentionally
12+
"E741", # ambiguous variable name
13+
"F841", # local variable assigned but never used
2214
]
2315

24-
# Exclude auto-generated or vendored files
2516
exclude = [
2617
".git",
2718
".venv",
2819
"__pycache__",
2920
"*.egg-info",
21+
"tests/mocks", # CI stub — not production code, skip entirely
3022
]
3123

3224
[lint.per-file-ignores]
33-
# Test files: allow unused imports (pytest fixtures, mock targets)
34-
"tests/*" = ["F401", "F811"]
35-
# mock_code.py contains intentional bugs — ignore all lint there
25+
# conftest imports pytest after sys.path manipulation — E402 is intentional
26+
"conftest.py" = ["E402", "F401"]
27+
# Test support files: allow unused imports and redefinitions
28+
"tests/*.py" = ["F401", "F811"]
29+
# These files contain intentional runtime bugs — skip all lint
3630
"tests/mock_code.py" = ["E", "F", "W"]
3731
"tests/mock_run.py" = ["E", "F", "W"]

0 commit comments

Comments
 (0)