-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruff.toml
61 lines (55 loc) · 1.67 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
target-version = "py311"
line-length = 88
[lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"S", # flake8-bandit
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"EM", # flake8-errmsg
"EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RET", # flake8-return
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PGH", # pygrep-hooks
"PL", # pylint
"TRY", # tryceratops
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # Line too long (handled by formatter)
"PLR0913", # Too many arguments to function call (> 5)
"S101", # Use of assert detected (may want to keep this for tests)
]
# Enable fixing for all rules, including logging format issues
fixable = ["ALL"]
unfixable = []
[lint.per-file-ignores]
"__init__.py" = ["F401"] # Ignore unused imports in __init__.py files
"*/api/*.py" = ["B008"] # Ignore function call argument default in FastAPI route definitions
"tests/*" = ["SIM117", "COM812", "S311"]
[lint.mccabe]
max-complexity = 10
[lint.isort]
combine-as-imports = true
force-sort-within-sections = true
known-first-party = ["your_project_name"]
known-third-party = ["fastapi", "pydantic", "sqlalchemy", "alembic"]