Skip to content

Commit

Permalink
Fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspeyrucain committed Jan 17, 2025
1 parent 6b189e4 commit 20fedf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion joy_teleop/joy_teleop/joy_teleop.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def __init__(self, name: str, config: typing.Dict[str, typing.Any],

if len(self.buttons) == 0 and len(self.axes) == 0 and len(self.axes_negative) == 0:
raise JoyTeleopException(
"No buttons, axes or negative_axes configured for command '{}'".format(name)
"No buttons, axes or negative_axes configured for command '{}'"
.format(name)
)

# Used to short-circuit the run command if there aren't enough buttons in the message.
Expand Down Expand Up @@ -143,6 +144,7 @@ def update_active_from_buttons_and_axes(self, joy_state: sensor_msgs.msg.Joy) ->
# like (0, 10), but the length of the joystick buttons is only 1. Ignore these.
pass


class JoyTeleopTopicCommand(JoyTeleopCommand):

def __init__(self, name: str, config: typing.Dict[str, typing.Any], node: Node) -> None:
Expand Down
4 changes: 2 additions & 2 deletions joy_teleop/test/test_parameter_failures.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def test_no_buttons_or_axes(self):
self.assertTrue(joy_teleop_process.wait_for_shutdown(timeout=10))

self.assertEqual(joy_teleop_process.exit_code, 1)
self.assertTrue('JoyTeleopException: No buttons, axes or negative_axes configured for command '
in joy_teleop_process.output)
self.assertTrue('JoyTeleopException: No buttons, axes or negative_axes '
'configured for command ' in joy_teleop_process.output)

def test_teleop_no_message_value_or_axis_mappings(self):
parameters = {}
Expand Down

0 comments on commit 20fedf3

Please sign in to comment.