Skip to content

Commit c076dc0

Browse files
committed
Add returns and return types to docstrings
1 parent ff2a034 commit c076dc0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

adafruit_pyoa.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ def _wait_for_press(self, card):
268268
269269
Return the id of the destination card.
270270
:type card: dict(str, str)
271+
:return: The id of the destination card
272+
:rtype: str
271273
"""
272274
button01_text = card.get("button01_text", None)
273275
button02_text = card.get("button02_text", None)
@@ -303,6 +305,8 @@ def display_card(self, card_num):
303305
"""Display and handle input on a card.
304306
305307
:param int card_num: the index of the card to process
308+
:return: the card number of the selected card
309+
:rtype: int
306310
"""
307311
card = self._game[card_num]
308312
print(card)
@@ -460,7 +464,8 @@ def wrap_nicely(string, max_chars):
460464
461465
:param str string: The text to be wrapped.
462466
:param int max_chars: The maximum number of characters on a line before wrapping.
463-
467+
:return: The list of lines
468+
:rtype: list(str)
464469
"""
465470
# string = string.replace('\n', '').replace('\r', '') # strip confusing newlines
466471
words = string.split(" ")

0 commit comments

Comments
 (0)