Skip to content

Commit 04bdfd6

Browse files
kaiaaiclaude
andcommitted
coverage: fix lint (import order + D401) that broke CI
The prior commit's contact-aware escape tripped two ament lints: - flake8 I100: `from ros_gz_interfaces.msg import Contacts` was placed before `import numpy`; moved to its alphabetical slot (after rclpy, before std_msgs). - pep257/flake8 D401: `_bumper_held_long` docstring wasn't imperative mood; reworded "True if ..." -> "Return True if ...". No behavior change. Verified locally in ros:jazzy: ament_flake8, ament_pep257, ament_copyright, and tools/check_rosdeps.py all clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0646b21 commit 04bdfd6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/oomwoo_coverage/oomwoo_coverage/coverage_planner_node.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848

4949
from nav_msgs.msg import OccupancyGrid
5050

51-
from ros_gz_interfaces.msg import Contacts
52-
5351
import numpy as np
5452

5553
import rclpy
@@ -63,6 +61,8 @@
6361
QoSReliabilityPolicy,
6462
)
6563

64+
from ros_gz_interfaces.msg import Contacts
65+
6666
from std_msgs.msg import Bool, Float32
6767

6868
# OccupancyGrid cell conventions
@@ -612,7 +612,7 @@ def _bumper_fresh(self, t) -> bool:
612612
return t is not None and self._elapsed(t) < self.bumper_fresh_sec
613613

614614
def _bumper_held_long(self) -> bool:
615-
"""True if a bumper has been pressed *continuously* for the escape threshold."""
615+
"""Return True if a bumper has been held *continuously* past the threshold."""
616616
if not self.contact_aware_escape:
617617
return False
618618
for last, since in ((self._bump_left_t, self._bump_left_held_since),

0 commit comments

Comments
 (0)