Skip to content

Commit

Permalink
Enforce keyword arguments, add typing
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Clephas <[email protected]>
  • Loading branch information
Timple committed Feb 27, 2024
1 parent 63dceed commit bdc1198
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion rclpy/rclpy/wait_for_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import Union

from rclpy.impl.implementation_singleton import rclpy_implementation as _rclpy
from rclpy.node import Node
from rclpy.qos import QoSProfile
from rclpy.signals import SignalHandlerGuardCondition
from rclpy.utilities import timeout_sec_to_nsec

Expand All @@ -22,7 +25,8 @@ def wait_for_message(
msg_type,
node: 'Node',
topic: str,
qos_profile = 1,
*,
qos_profile: Union[QoSProfile, int] = 1,
time_to_wait=-1
):
"""
Expand Down
2 changes: 1 addition & 1 deletion rclpy/test/test_wait_for_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_wait_for_message(self):
t.join()

def test_wait_for_message_timeout(self):
ret, _ = wait_for_message(BasicTypes, self.node, TOPIC_NAME, 1)
ret, _ = wait_for_message(BasicTypes, self.node, TOPIC_NAME, time_to_wait=1)
self.assertFalse(ret)


Expand Down

0 comments on commit bdc1198

Please sign in to comment.