Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
61 lines (60 loc) · 3.95 KB
/
Copy pathpyproject.toml
File metadata and controls
61 lines (60 loc) · 3.95 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
[tool.ruff]
target-version = "py310"
line-length = 120
lint.select = ["ALL"]
lint.fixable = ["ALL"]
lint.ignore=[
"C901", "PLR0912", "S311", "SLF001", "PLR0915", "PLR2004", "B904",
"N806", "PLR0911", "DTZ005",
"NPY002", # Replace legacy `np.random.uniform` call with `np.random.Generator`
"SIM105", # Use `contextlib.suppress(queue.Empty)` instead of `try`-`except`-`pass`
"TC001", "TC002", "TC003", # move imports into a type-checking block
"PT018", # multiple parts in assert
"SLF001", # access private member
"SIM102", # nested if
"FBT", # Boolean positional value in function call
"C416", # dict comprehension
"TRY", "EM", # exception messages
"S101", "S301", # assert, pickle
"PTH103", "PTH111", "PTH118", "PTH123", "PTH100", "PTH120", # os.makedirs, os.path.expanduser, etc.
"ARG001", "ARG002", # unused function arg
"T201", # print statements
"COM812", # trailing comma missing
"ERA001", # commented out code
"INP001", # file part of an implicit namespace package. Add an `__init__.py`.
"EXE", # file is executable but no shebang is present
"FIX", # lines with todo comments
"TD", # names/colon for assigning todo comments
"D", # docstring details for public functions
"ANN", # return type annotations for public functions
"S603", # check for untrusted input for subprocess
"SIM108", # ternary operator enforcement
"S108", # portable path
"S607", # partial executable path
"RUF012", "RUF013", "RUF005", # iterable unpacking
"BLE001", # blind exception
"PLR0913", # number of args to a function
"B026", # Star-arg unpacking after a keyword argument
"PLE1205", # Too many arguments for `logging` format string; skip this since it doesn't recognize the {...} syntax
"N812", # comman pattern of import torch.nn.functional as F
]
[tool.ruff.lint.per-file-ignores]
"src/holosoma_inference/**/*.py" = ["G004"] # f-strings in logging are fine here
# Warp kernels: float()/int() literal wrappers are load-bearing (a bare literal is inferred
# as const and cannot bind to mesh_query_ray's mutable float&/int& out-params), so the rules
# that strip them must be disabled: UP018 (both), RUF046 (int(0)).
"src/holosoma/holosoma/utils/warp_utils.py" = ["UP018", "RUF046"]
"src/holosoma/holosoma/simulator/isaacsim/**/*.py" = ["ALL"] # Disable until Jenkins has access to IsaacLab
"src/holosoma/holosoma/train_agent.py" = ["PLC0415"] # Disable since imports after SimApp are inherent to IsaacSim
"src/holosoma/tests/simulators/*_assert.py" = ["PLC0415"] # Standalone sim harnesses defer torch/isaaclab imports until after the SimApp is launched (inherent to IsaacSim)
"src/holosoma/tests/simulators/_sim_harness.py" = ["PLC0415"] # Shared harness helpers defer config imports the same way
"src/holosoma/holosoma/utils/draw.py" = ["F401"] # Disable since unused imports are required for the adapters
"src/holosoma/holosoma/utils/eval_utils.py" = ["PLC0415"] # Disable since imports after SimApp are inherent to IsaacSim
"src/holosoma_inference/holosoma_inference/policies/base.py" = ["PLC0415"] # Deferred imports for optional heavy deps (ROS2, joystick, keyboard providers)
"src/holosoma_inference/holosoma_inference/policies/locomotion.py" = ["PLC0415"] # Deferred provider imports
"src/holosoma_inference/holosoma_inference/policies/wbt.py" = ["PLC0415"] # Deferred provider imports
"src/holosoma_inference/holosoma_inference/policies/dual_mode.py" = ["PLC0415"] # Deferred imports to avoid circular deps
"src/holosoma_inference/holosoma_inference/inputs/impl/ros2.py" = ["PLC0415"] # Deferred ROS2 message imports (rclpy/geometry_msgs optional)
"src/holosoma_inference/holosoma_inference/run_policy.py" = ["PLC0415"] # Deferred imports in main entry point
"src/holosoma_inference/holosoma_inference/config/tests/**" = ["PLC0415"] # Test-scoped imports for isolation
"src/holosoma_inference/holosoma_inference/inputs/tests/**" = ["PLC0415"] # Test-scoped imports for isolation