-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
124 lines (120 loc) · 3.37 KB
/
Copy pathruff.toml
File metadata and controls
124 lines (120 loc) · 3.37 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#:schema https://www.schemastore.org/ruff.json
# Strict lint rules for procclean
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"
]
line-length = 88
indent-width = 4
# Intentionally deviates from pyproject.toml (py314)
# as exception tuples without parentheses interfere with some parsers
target-version = "py313"
[lint]
preview = true
select = [
"A", # flake8-builtins (shadow detection)
"ANN", # flake8-annotations
"B", # flake8-bugbear (common bugs)
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C90", # mccabe
"D", # pydocstyle
"DOC", # pydoclint
"DTZ", # flake8-datetimez (timezone awareness)
"E", # pycodestyle - Error
"EM", # flake8-errmsg (exception messages)
"ERA", # eradicate (commented code)
"EXE", # flake8-executable (shebang)
"F", # Pyflakes
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"LOG", # flake8-logging
"N", # pep8-naming
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # Pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"S", # flake8-bandit (security)
"SIM", # flake8-simplify
"SLF", # flake8-self (private access)
"SLOT", # flake8-slots
"T10", # flake8-debugger
"T20", # flake8-print
"TC", # flake8-type-checking
"TD", # flake8-todos
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle - Warning
"YTT", # flake8-2020 (sys.version checks)
]
ignore = [
"D203", # 1 blank line required before class docstring (conflicts with D211)
"D213", # Multi-line docstring summary second line
"D413", # Missing blank line after last section of docstring
"PLW0717", # too-many-try-statements - psutil guard blocks need a broad try
"PTH123", # builtin open() - simpler for some cases
"S101", # assert OK - not security-critical CLI tool
"S404", # subprocess import - legitimate use
"S603", # subprocess without shell check - we use psutil
"S607", # partial path - OK for CLI
"TRY300", # Return in try block
]
fixable = ["ALL"]
unfixable = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[lint.per-file-ignores]
"tests/**/*.py" = [
"ANN", # Type annotations not required in tests
"PLC2701", # Private name import - OK for testing internal functions
"PLR0904", # Too many public methods - test classes are large
"PLR0913", # Too many arguments - mock decorators add params
"PLR0917", # Too many positional arguments - same reason
"PLR6301", # Method could be a function, class method, or static method
"SLF001", # testing private members
]
"src/procclean/cli/**/*.py" = [
"A004", # builtin-import-shadowing - intentional rich.print override
]
"src/procclean/tui/app.py" = [
"PLR0904", # Too many public methods - TUI apps have many action handlers
]
[format]
preview = true
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true