Skip to content

Commit

Permalink
(states(FuncDesignator) check callable
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Jun 29, 2023
1 parent f515ab5 commit 68a6cd8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /usr/bin/env python

from typing import TypeVar, Union
from collections.abc import Callable

# ROS
import rospy
Expand Down Expand Up @@ -202,6 +203,9 @@ class FuncDesignator(Designator):

def __init__(self, orig, func, resolve_type=None, name=None):
super(FuncDesignator, self).__init__(resolve_type=resolve_type, name=name)

assert isinstance(func, Callable)

self.orig = orig
self.func = func

Expand Down

0 comments on commit 68a6cd8

Please sign in to comment.