Skip to content

Commit

Permalink
Improve pydoc
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <[email protected]>
  • Loading branch information
MiguelCompany committed Apr 1, 2024
1 parent 23569a0 commit ffddb44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rosidl_parser/rosidl_parser/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,10 @@ def __init__(self, namespaced_type: NamespacedType, members=None):

def has_any_member_with_annotation(self, name: str):
"""
Returns whether any member has a particular annotation.
Check whether any member has a particular annotation.
:param name: the annotation name
:param str name: the name of the annotation
:returns: True if there is at least one member with the annotation, False otherwise
"""
has_any = [member.name for member in self.members if member.has_annotation(name)]
return bool(has_any)
Expand Down

0 comments on commit ffddb44

Please sign in to comment.