-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
57 lines (53 loc) · 1.48 KB
/
Copy pathruff.toml
File metadata and controls
57 lines (53 loc) · 1.48 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
# Ruff configuration
# Comprehensive Python linting and formatting
target-version = "py311"
line-length = 120
extend-exclude = [
".venv",
"venv",
"__pycache__",
".pytest_cache",
".mypy_cache",
".ruff_cache",
"*.pyc",
]
[lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PL", # pylint
"RUF", # ruff-specific rules
]
ignore = [
"E501", # line too long (handled by formatter)
"PLR0913", # too many arguments
"PLR0912", # too many branches
"PLR0915", # too many statements (complex functions are intentional)
"PLR0911", # too many return statements
"PLR2004", # magic value comparison
"SIM108", # use ternary operator
"PLC0415", # late imports (needed for optional dependencies)
]
[lint.per-file-ignores]
"tests/**/*.py" = [
"ARG001", # unused function argument
"ARG002", # unused method argument (common in test mocks)
"S101", # use of assert
"PLR2004", # magic values in tests
"SIM117", # nested with statements (clearer in test fixtures)
]
"__init__.py" = ["F401"]
[lint.isort]
known-first-party = ["src"]
force-single-line = false
lines-after-imports = 2