-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Expand file tree
/
Copy pathruff.toml
More file actions
46 lines (39 loc) · 1.03 KB
/
ruff.toml
File metadata and controls
46 lines (39 loc) · 1.03 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
# Ruff configuration for QGroundControl Python tools
# https://docs.astral.sh/ruff/
target-version = "py312"
line-length = 100
# Exclude build artifacts and external dependencies
exclude = [
"build",
".git",
"__pycache__",
"*.egg-info",
]
[lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # Line too long (handled by formatter)
"B008", # Function call in default argument (common in argparse)
"SIM108", # Use ternary operator (can reduce readability)
]
[lint.isort]
known-first-party = ["qgc"]
[lint.per-file-ignores]
"test/**/*.py" = ["B011"] # Allow assert in tests
[format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "lf"
docstring-code-format = true