-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ruff.toml
70 lines (62 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
62
63
64
65
66
67
68
69
70
# Ruff configuration for ros_to_markdown
# See https://docs.astral.sh/ruff/settings/
# Target Python versions
target-version = "py38" # Lowest supported version (for ROS Noetic)
# Line length to match project standards
line-length = 100
# Exclude common directories
exclude = [
".git",
".mypy_cache",
".ruff_cache",
".venv",
"__pycache__",
"build",
"dist",
"tests_old",
"src/ros_to_markdown_old",
]
[lint]
# Enable all recommended rules
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"RET", # flake8-return
"SIM", # flake8-simplify
]
# Ignore certain rules
# ignore = [
# "D203", # one-blank-line-before-class (conflicts with D211)
# "D212", # multi-line-summary-first-line (conflicts with D213)
# "D107", # missing docstring in __init__
# ]
# Per-file ignores
[lint.per-file-ignores]
"tests/*" = [
"S101", # Use of assert
"E501", # Line too long
]
"scripts/**/*" = [
"T201", # Allow print statements in scripts
]
"src/ros_to_markdown/ros2/workspace.py" = [
"E741", # Ambiguous variable names specifically for this file
]
"examples/**/*" = [
"T201", # Allow print statements in examples
]
[lint.pydocstyle]
convention = "google" # Use Google-style docstrings
[lint.isort]
combine-as-imports = true
force-sort-within-sections = true
known-first-party = ["ros_to_markdown"]
known-third-party = ["rclpy", "rospy"]
section-order = ["future", "standard-library", "first-party", "third-party", "local-folder"]