Skip to content

Commit 84ae12d

Browse files
committed
Add some type hints to the Python code
1 parent 46929a8 commit 84ae12d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

btpy/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
)
1515

1616

17-
def ports(inputs=[], outputs=[]):
17+
def ports(inputs: list[str] = [], outputs: list[str] = []):
1818
"""Decorator to specify input and outputs ports for an action node."""
1919

2020
def specify_ports(cls):
@@ -41,11 +41,11 @@ class AsyncActionNode(StatefulActionNode):
4141
def __init__(self, name, config):
4242
super().__init__(name, config)
4343

44-
def on_start(self):
44+
def on_start(self) -> NodeStatus:
4545
self.coroutine = self.run()
4646
return NodeStatus.RUNNING
4747

48-
def on_running(self):
48+
def on_running(self) -> NodeStatus:
4949
# The library logic should never allow this to happen, but users can
5050
# still manually call `on_running` without an associated `on_start`
5151
# call. Make sure to print a useful error when this happens.

0 commit comments

Comments
 (0)