-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathruff.toml
More file actions
94 lines (80 loc) · 2.19 KB
/
Copy pathruff.toml
File metadata and controls
94 lines (80 loc) · 2.19 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Exclude commonly ignored directories
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.12 (matches minimum supported version in pyproject.toml)
target-version = "py312"
preview = true
[lint]
ignore = [
"COM812", # missing trailing comma (handled by format)
"TID252", # relative import
"D203", # conflict: incorrect blank line before class (uses D211 instead)
"D213", # conflict: multi-line summary second line (uses D212 instead)
"CPY001", # copyright notice at top of file
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Select existing rules
select = [
"D", # enforces docstring presence and basic formatting
"DOC", # validates docstring content against the function signature
"ANN", # enforces type annotations
"E501", # enforces line-length limit
"INP001", # require __init__.py in submodules
"I001", # unsorted imports
"RUF022", # unsorted dunder __all__
"F401", # unused imports
"F403", # wildcard import
"F405", # names relying on wildcard imports
"F841", # unused variable
]
[lint.pydocstyle]
convention = "google"
[lint.per-file-ignores]
"docs/**.py" = ["ALL"]
"tests/**.py" = ["ALL"]
"fuellib/cli/**.py" = ["ALL"]
"fuellib/exporters/**.py" = ["ALL"]
"fuellib/_data_locator.py" = ["ALL"]
"tutorials/**.py" = ["ALL"]
[format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"