Skip to content

Commit

Permalink
add black line break
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Oct 24, 2023
1 parent 2e26a4e commit de43520
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ repos:
files: ^.github|./\.yaml

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.10.1
hooks:
- id: black
args: ["--line-length=99"]
args: ["--line-length=99", "--experimental-string-processing"]

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
Expand Down
4 changes: 3 additions & 1 deletion rosbot_xl_bringup/launch/bringup.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def generate_launch_description():
declare_mecanum_arg = DeclareLaunchArgument(
"mecanum",
default_value="False",
description="Whether to use mecanum drive controller (otherwise diff drive controller is used)",
description=(
"Whether to use mecanum drive controller (otherwise diff drive controller is used)"
),
)

lidar_model = LaunchConfiguration("lidar_model")
Expand Down
3 changes: 0 additions & 3 deletions rosbot_xl_controller/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@
script_dir=$base/lib/rosbot_xl_controller
[install]
install_scripts=$base/lib/rosbot_xl_controller
[flake8]
ignore = E501,W503 # Ignore "line too long" (E501) and "line break before binary operator" (W503) - black checks it
max-line-length = 99
21 changes: 12 additions & 9 deletions rosbot_xl_controller/test/test_diff_drive_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,20 @@ def test_controllers_startup_fail():

node.start_node_thread()
msgs_received_flag = node.joint_state_msg_event.wait(timeout=10.0)
assert (
not msgs_received_flag
), "Received JointStates message that should not have appeared. Check whether other robots are connected to your network.!"
assert not msgs_received_flag, (
"Received JointStates message that should not have appeared. Check whether other"
" robots are connected to your network.!"
)
msgs_received_flag = node.odom_msg_event.wait(timeout=10.0)
assert (
not msgs_received_flag
), "Received Odom message that should not have appeared. Check whether other robots are connected to your network.!"
assert not msgs_received_flag, (
"Received Odom message that should not have appeared. Check whether other robots are"
" connected to your network.!"
)
msgs_received_flag = node.imu_msg_event.wait(timeout=10.0)
assert (
not msgs_received_flag
), "Received Imu message that should not have appeared. Check whether other robots are connected to your network.!"
assert not msgs_received_flag, (
"Received Imu message that should not have appeared. Check whether other robots are"
" connected to your network.!"
)
finally:
rclpy.shutdown()

Expand Down
19 changes: 12 additions & 7 deletions rosbot_xl_controller/test/test_mecanum_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,20 @@ def test_controllers_startup_fail():

node.start_node_thread()
msgs_received_flag = node.joint_state_msg_event.wait(timeout=10.0)
assert (
not msgs_received_flag
), "Expected JointStates message not received. Check joint_state_broadcaster!"
assert not msgs_received_flag, (
"Received JointStates message that should not have appeared. Check whether other"
" robots are connected to your network.! aaaaaaaaaaaaaaaaaaaaaaaaaaa"
)
msgs_received_flag = node.odom_msg_event.wait(timeout=10.0)
assert (
not msgs_received_flag
), "Expected Odom message not received. Check rosbot_base_controller!"
assert not msgs_received_flag, (
"Received Odom message that should not have appeared. Check whether other robots are"
" connected to your network.!"
)
msgs_received_flag = node.imu_msg_event.wait(timeout=10.0)
assert not msgs_received_flag, "Expected Imu message not received. Check imu_broadcaster!"
assert not msgs_received_flag, (
"Received Imu message that should not have appeared. Check whether other robots are"
" connected to your network.!"
)
finally:
rclpy.shutdown()

Expand Down
4 changes: 3 additions & 1 deletion rosbot_xl_gazebo/launch/simulation.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def generate_launch_description():
declare_mecanum_arg = DeclareLaunchArgument(
"mecanum",
default_value="False",
description="Whether to use mecanum drive controller (otherwise diff drive controller is used)",
description=(
"Whether to use mecanum drive controller (otherwise diff drive controller is used)"
),
)

lidar_model = LaunchConfiguration("lidar_model")
Expand Down

0 comments on commit de43520

Please sign in to comment.