-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruff.toml
65 lines (58 loc) · 2.6 KB
/
ruff.toml
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
exclude = [
".git",
".mypy_cache",
".ruff_cache",
".venv",
"__pypackages__",
"__pycache__",
]
line-length = 120
indent-width = 4
target-version = "py310"
[lint]
select = ["ALL"]
ignore = [
"D400", # First line should end with a period
"D415", # First line should end with a period, question mark, or exclamation point
"ANN204", # Missing return type annotation for special method __init__
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"EM101", # Exception must not use a string literal, assign to variable first
"S101", # Use of `assert` detected
"ANN101", # Missing type annotation for `self` in method
"EM102", # Exception must not use an f-string literal, assign to variable first
"TRY003", # Avoid specifying long messages outside the exception class
"D203", # 1 blank line required before class docstring (conflicts with D211)
"D213", # Multi-line docstring summary should start at the second line (conflicts with D212)
"T201", # `print` found (allow print statements for debugging)
"ERA001", # Found commented-out code (allow for development reference)
"NPY002", # Replace legacy numpy random calls (maintain compatibility)
"UP035", # `typing.List` is deprecated (maintain compatibility)
"UP006", # Use `list` instead of `List` (maintain compatibility)
"B905", # `zip()` without explicit `strict=` parameter (maintain compatibility)
"PLR2004", # Magic value used in comparison (allow for simple cases)
"PLR0913", # Too many arguments in function definition
"PLR0915", # Too many statements
"C901", # Function is too complex
"FBT002", # Boolean positional arg in function definition
"PGH003", # Use specific rule codes when ignoring type issues
"PTH100", # os.path.abspath() should be replaced
"PTH120", # os.path.dirname() should be replaced
"PTH123", # open() should be replaced
"PTH118", # os.path.join() should be replaced
"UP015", # Unnecessary open mode parameters
"RET504", # Unnecessary assignment before return
"PD011", # Use .to_numpy() instead of .values
]
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[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"