-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy path.ruff.toml
More file actions
43 lines (34 loc) · 1.58 KB
/
.ruff.toml
File metadata and controls
43 lines (34 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
include = ["soundconverter/", "bin/soundconverter.in"]
line-length = 88
lint.exclude = ["tests/*"]
# Linter rules
lint.extend-select = [
"F", # Pyflakes rules
"W", # PyCodeStyle warnings
"E", # PyCodeStyle errors
"I", # Sort imports properly
"UP", # Warn if certain things can changed due to newer Python versions
"C4", # Catch incorrect use of comprehensions, dict, list, etc
"FA", # Enforce from __future__ import annotations
"ISC", # Good use of string concatenation
"ICN", # Use common import conventions
"RET", # Good return practices
# "SIM", # Common simplification rules
"TID", # Some good import practices
# "PTH", # Use pathlib instead of os.path
# "TD", # Be diligent with TODO comments
"NPY", # Some numpy-specific things
"A", # detect shadowed builtins
# "BLE", # disallow catch-all exceptions
# "S", # disallow things like "exec"; also restricts "assert" but I just NOQA it when I really need it
# "COM", # enforce trailing comma rules
# "DTZ", # require strict timezone manipulation with datetime
#"FBT", # detect boolean traps
"N", # enforce naming conventions, e.g. ClassName vs function_name
]
lint.ignore = ["E501", "N806", "ISC001"]
[lint.per-file-ignores]
# Ignore `E402` (import violations) for bin/soundconverter`.
# As we are loading and initializing modules dynamically,
# we cannot have application import statements at the top level.
"bin/soundconverter.in" = ["E402"]