Repository navigation
Expand file tree
/
Copy pathruff.toml
More file actions
46 lines (42 loc) · 1.99 KB
/
Copy pathruff.toml
File metadata and controls
46 lines (42 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# ruff configuration for PyAutoEyes.
#
# PyAutoEyes is an organ, not an installable package: there is no pyproject.toml,
# and `bin/pyauto-eyes` puts the repo root on sys.path so `eyes/` imports by its
# top-level name. A standalone ruff.toml at the repository root is the supported
# configuration location for that case (see https://docs.astral.sh/ruff/configuration/).
# The rule set was inherited from autolens_visualization (itself copied from
# autolens_profiling) and is kept deliberately conservative.
target-version = "py311"
line-length = 100
# Exclude generated / external folders.
extend-exclude = [
".venv",
"venv",
]
[lint]
# Conservative selection — catch real bugs without imposing a strict style.
# Profiling scripts use scientific patterns that can clash with stricter rule
# sets (long lines for table headers, `if __name__ == "__main__":` is rare
# because scripts run top-level, etc.).
select = [
"E", # pycodestyle errors
"F", # pyflakes (undefined names, unused imports)
"W", # pycodestyle warnings
"I", # isort (import order)
"UP", # pyupgrade (Python version idioms)
"B", # flake8-bugbear (likely bugs)
]
ignore = [
"E501", # long lines — common in scientific code; ruff format handles wrapping
"E402", # module-level imports not at top of file — profiling scripts often
# set env vars (NUMBA_CACHE_DIR etc.) before importing autolens
"F401", # unused imports — some scripts deliberately import-for-side-effect
# (e.g. `from autoconf import jax_wrapper # noqa: F401`)
"B008", # function call in default argument — common autofit pattern
"B905", # zip() without strict= — scripts zip equal-length lists they built
# themselves; threading strict= through adds noise, not safety
"B007", # unused loop-control variable — warm-up/repeat loops (`for _i in
# range(n)`) are the dominant pattern in timing code
]
[format]
# Defaults: black-compatible. Nothing to override.