Skip to content

Commit 4953156

Browse files
authored
Use typing.Any for type hints in kwargs (#475)
1 parent fbf34c9 commit 4953156

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

py_trees/composites.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def __init__(
660660
super(Parallel, self).__init__(name, children)
661661
self.policy = policy
662662

663-
def setup(self, **kwargs: int) -> None:
663+
def setup(self, **kwargs: typing.Any) -> None:
664664
"""
665665
Detect before ticking whether the policy configuration is invalid.
666666

py_trees/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def __init__(self, name: str, child: behaviour.Behaviour):
560560
self.running_count = 0
561561
self.interrupt_count = 0
562562

563-
def setup(self, **kwargs: int) -> None:
563+
def setup(self, **kwargs: typing.Any) -> None:
564564
"""Reset the counters."""
565565
self.total_tick_count = 0
566566
self.failure_count = 0

py_trees/demos/action.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def __init__(self, name: str):
144144
super(Action, self).__init__(name)
145145
self.logger.debug("%s.__init__()" % (self.__class__.__name__))
146146

147-
def setup(self, **kwargs: int) -> None:
147+
def setup(self, **kwargs: typing.Any) -> None:
148148
"""Kickstart the separate process this behaviour will work with.
149149
150150
Ordinarily this process will be already running. In this case,

py_trees/demos/lifecycle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def __init__(self, name: str = "Counter"):
107107
super(Counter, self).__init__(name)
108108
self.logger.debug("%s.__init__()" % (self.__class__.__name__))
109109

110-
def setup(self, **kwargs: int) -> None:
110+
def setup(self, **kwargs: typing.Any) -> None:
111111
"""No delayed initialisation required for this example."""
112112
self.logger.debug("%s.setup()" % (self.__class__.__name__))
113113

py_trees/trees.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def setup(
5151
root: behaviour.Behaviour,
5252
timeout: typing.Union[float, common.Duration] = common.Duration.INFINITE,
5353
visitor: typing.Optional[visitors.VisitorBase] = None,
54-
**kwargs: int,
54+
**kwargs: typing.Any,
5555
) -> None:
5656
"""
5757
Crawl across a (sub)tree of behaviours calling :meth:`~py_trees.behaviour.Behaviour.setup` on each behaviour.
@@ -355,7 +355,7 @@ def setup(
355355
self,
356356
timeout: typing.Union[float, common.Duration] = common.Duration.INFINITE,
357357
visitor: typing.Optional[visitors.VisitorBase] = None,
358-
**kwargs: int,
358+
**kwargs: typing.Any,
359359
) -> None:
360360
"""
361361
Crawl across the tree calling :meth:`~py_trees.behaviour.Behaviour.setup` on each behaviour.

0 commit comments

Comments
 (0)