-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
75 lines (64 loc) · 1.75 KB
/
ruff.toml
File metadata and controls
75 lines (64 loc) · 1.75 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
# Ruff configuration file
# Ruff combines the functionality of Black, isort, flake8, pylint, and more
[lint]
# Enable specific rule sets
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"UP", # pyupgrade
"B", # flake8-bugbear
"S", # flake8-bandit
"T20", # flake8-print
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RET", # flake8-return
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PL", # Pylint
"C90", # mccabe complexity
]
# Ignore specific rules
ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"S101", # Use of assert detected (common in tests)
"T201", # print found (useful for debugging/CLI tools)
]
# Exclude specific directories/files
exclude = [
".git",
"__pycache__",
".venv",
"build",
"dist",
"*.egg-info",
]
# Set maximum line length
line-length = 88
# Set maximum complexity
mccabe.max-complexity = 10
[format]
# Use double quotes for strings
quote-style = "double"
# Use trailing commas
skip-magic-trailing-comma = false
# Indent with spaces
indent-style = "space"
# Target Python 3.8+
target-version = "py38"
[lint.per-file-ignores]
# Test files can have longer lines and use assert
"tests/*" = ["S101", "PLR2004"]
[lint.pydocstyle]
# Use Google docstring convention
convention = "google"