Skip to content

Commit

Permalink
[composites] use typing.Sequence for children argument (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
Efe Mert Demir authored Aug 31, 2024
1 parent 8bfe7c3 commit 07fdc76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions py_trees/composites.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Composite(behaviour.Behaviour, abc.ABC):
def __init__(
self,
name: str,
children: typing.Optional[typing.List[behaviour.Behaviour]] = None,
children: typing.Optional[typing.Sequence[behaviour.Behaviour]] = None,
):
super(Composite, self).__init__(name)
if children is not None:
Expand Down Expand Up @@ -381,7 +381,7 @@ def __init__(
self,
name: str,
memory: bool,
children: typing.Optional[typing.List[behaviour.Behaviour]] = None,
children: typing.Optional[typing.Sequence[behaviour.Behaviour]] = None,
):
super(Selector, self).__init__(name, children)
self.memory = memory
Expand Down Expand Up @@ -517,7 +517,7 @@ def __init__(
self,
name: str,
memory: bool,
children: typing.Optional[typing.List[behaviour.Behaviour]] = None,
children: typing.Optional[typing.Sequence[behaviour.Behaviour]] = None,
):
super(Sequence, self).__init__(name, children)
self.memory = memory
Expand Down Expand Up @@ -647,7 +647,7 @@ def __init__(
self,
name: str,
policy: common.ParallelPolicy.Base,
children: typing.Optional[typing.List[behaviour.Behaviour]] = None,
children: typing.Optional[typing.Sequence[behaviour.Behaviour]] = None,
):
"""
Initialise the behaviour with name, policy and a list of children.
Expand Down

0 comments on commit 07fdc76

Please sign in to comment.