forked from mavlink/qgroundcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
68 lines (61 loc) · 1.92 KB
/
Copy pathruff.toml
File metadata and controls
68 lines (61 loc) · 1.92 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
# Ruff configuration for QGroundControl Python tools
# https://docs.astral.sh/ruff/
target-version = "py310"
line-length = 100
# Exclude build artifacts and external dependencies
exclude = [
"build",
".git",
"__pycache__",
"*.egg-info",
".venv",
"**/.venv",
"tools/skills",
]
[lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"SIM", # flake8-simplify
"TC", # 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
# Bootstrap scripts manipulate sys.path before importing project modules.
"tools/check_deps.py" = ["E402"]
"tools/clean.py" = ["E402"]
"tools/configure.py" = ["E402"]
"tools/coverage.py" = ["E402"]
"tools/generate_docs.py" = ["E402"]
"tools/pre_commit.py" = ["E402"]
"tools/release.py" = ["E402"]
"tools/analyzers/*.py" = ["E402"]
"tools/generators/config_qml/generate_pages.py" = ["E402"]
"tools/setup/build-gstreamer.py" = ["E402"]
"tools/setup/install_python.py" = ["E402"]
"tools/setup/install_qt.py" = ["E402"]
".github/scripts/*.py" = ["E402"]
".github/scripts/tests/*.py" = ["E402"]
# pseudo_loc.py deliberately uses look-alike characters for pseudo-localization.
"tools/pseudo_loc.py" = ["RUF001"]
# settings_qml/model.py's regex must match fullwidth + enumeration commas that translators use.
"tools/generators/settings_qml/model.py" = ["RUF001", "RUF003"]
[format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "lf"
docstring-code-format = true