-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathruff.toml
More file actions
50 lines (44 loc) · 1.58 KB
/
Copy pathruff.toml
File metadata and controls
50 lines (44 loc) · 1.58 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
47
48
49
50
# SPDX-FileCopyrightText: 2026 Koen van Greevenbroek
#
# SPDX-License-Identifier: CC-BY-4.0
target-version = "py39"
line-length = 88
# Exclude directories from linting
exclude = [
".snakemake",
"results",
"__pycache__",
]
[lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"SIM", # flake8-simplify
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # line too long (handled by line-length)
"B008", # do not perform function calls in argument defaults
]
[lint.per-file-ignores]
"__init__.py" = ["F401"] # unused imports in __init__.py files
"workflow/scripts/*.py" = ["F821"] # Undefined name 'snakemake' (injected by Snakemake)
"workflow/scripts/plotting/*.py" = ["B018"] # Snakemake variable check is intentional
"workflow/scripts/build_model.py" = ["N806"] # Mathematical variables (X, C, H, D) use conventional uppercase
"workflow/scripts/doc_figures/trade_network_map.py" = ["N806"] # Mathematical variables use conventional uppercase
"workflow/scripts/prepare_*.py" = ["N806"] # Constants use uppercase by convention
"workflow/scripts/solve_model.py" = ["N801"] # linopy stub class for type checking
"workflow/scripts/calibrate_deviation_penalty.py" = ["N803", "N806"] # Jacobian J/J0 use conventional uppercase
[lint.isort]
known-first-party = ["workflow"]
force-sort-within-sections = true
[format]
quote-style = "double"
indent-style = "space"