Skip to content

Commit

Permalink
change method name
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Henkel <[email protected]>
  • Loading branch information
ct2034 authored and MarcoLm993 committed Jul 11, 2024
1 parent e941e96 commit 6fc9d50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
as_plain_execution_body)
from scxml_converter.scxml_entries.utils import replace_ros_msg_expression
from xml.etree import ElementTree as ET
from scxml_converter.scxml_entries.utils import check_topic_type_known
from scxml_converter.scxml_entries.utils import is_topic_type_known


class RosTimeRate(ScxmlBase):
Expand Down Expand Up @@ -96,7 +96,7 @@ def from_xml_tree(xml_tree: ET.Element) -> "RosTopicPublisher":

def check_validity(self) -> bool:
valid_name = isinstance(self._topic_name, str) and len(self._topic_name) > 0
valid_type = check_topic_type_known(self._topic_type)
valid_type = is_topic_type_known(self._topic_type)
if not valid_name:
print("Error: SCXML topic subscriber: topic name is not valid.")
if not valid_type:
Expand Down Expand Up @@ -141,7 +141,7 @@ def from_xml_tree(xml_tree: ET.Element) -> "RosTopicSubscriber":

def check_validity(self) -> bool:
valid_name = isinstance(self._topic_name, str) and len(self._topic_name) > 0
valid_type = check_topic_type_known(self._topic_type)
valid_type = is_topic_type_known(self._topic_type)
if not valid_name:
print("Error: SCXML topic subscriber: topic name is not valid.")
if not valid_type:
Expand Down
2 changes: 1 addition & 1 deletion scxml_converter/src/scxml_converter/scxml_entries/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from typing import Dict


def check_topic_type_known(topic_definition: str) -> bool:
def is_topic_type_known(topic_definition: str) -> bool:
"""Check if python can import the provided topic definition."""
# Check the input type has the expected structure
if not (isinstance(topic_definition, str) and topic_definition.count("/") == 1):
Expand Down

0 comments on commit 6fc9d50

Please sign in to comment.