Skip to content

Commit 7637029

Browse files
committed
Updated docstrings in stub file to use Google style.
1 parent 7f60cef commit 7637029

1 file changed

Lines changed: 30 additions & 14 deletions

File tree

  • exercises/concept/tisbury-treasure-hunt

exercises/concept/tisbury-treasure-hunt/tuples.py

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
def get_coordinate(record):
55
"""Return coordinate value from a tuple containing the treasure name, and treasure coordinate.
66
7-
:param record: tuple - with a (treasure, coordinate) pair.
8-
:return: str - the extracted map coordinate.
7+
Parameters:
8+
record (tuple): A (treasure, coordinate) pair.
9+
10+
Returns:
11+
str: The extracted map coordinate.
912
"""
1013

1114
pass
@@ -14,8 +17,11 @@ def get_coordinate(record):
1417
def convert_coordinate(coordinate):
1518
"""Split the given coordinate into tuple containing its individual components.
1619
17-
:param coordinate: str - a string map coordinate
18-
:return: tuple - the string coordinate split into its individual components.
20+
Parameters:
21+
coordinate (str): A string map coordinate.
22+
23+
Returns:
24+
tuple: The string coordinate split into its individual components.
1925
"""
2026

2127
pass
@@ -24,9 +30,12 @@ def convert_coordinate(coordinate):
2430
def compare_records(azara_record, rui_record):
2531
"""Compare two record types and determine if their coordinates match.
2632
27-
:param azara_record: tuple - a (treasure, coordinate) pair.
28-
:param rui_record: tuple - a (location, tuple(coordinate_1, coordinate_2), quadrant) trio.
29-
:return: bool - do the coordinates match?
33+
Parameters:
34+
azara_record (tuple): A (treasure, coordinate) pair.
35+
rui_record (tuple): A (location, tuple(coordinate_1, coordinate_2), quadrant) trio.
36+
37+
Returns:
38+
bool: Do the coordinates match?
3039
"""
3140

3241
pass
@@ -35,9 +44,12 @@ def compare_records(azara_record, rui_record):
3544
def create_record(azara_record, rui_record):
3645
"""Combine the two record types (if possible) and create a combined record group.
3746
38-
:param azara_record: tuple - a (treasure, coordinate) pair.
39-
:param rui_record: tuple - a (location, coordinate, quadrant) trio.
40-
:return: tuple or str - the combined record (if compatible), or the string "not a match" (if incompatible).
47+
Parameters:
48+
azara_record (tuple): A (treasure, coordinate) pair.
49+
rui_record (tuple): A (location, coordinate, quadrant) trio.
50+
51+
Returns:
52+
tuple or str: The combined record (if compatible), or the string "not a match" (if incompatible).
4153
"""
4254

4355
pass
@@ -46,12 +58,16 @@ def create_record(azara_record, rui_record):
4658
def clean_up(combined_record_group):
4759
"""Clean up a combined record group into a multi-line string of single records.
4860
49-
:param combined_record_group: tuple - everything from both participants.
50-
:return: str - everything "cleaned", excess coordinates and information are removed.
61+
Parameters:
62+
combined_record_group (tuple): Everything from both participants.
63+
64+
Returns:
65+
str: Everything "cleaned", excess coordinates and information are removed.
5166
52-
The return statement should be a multi-lined string with items separated by newlines.
67+
Note:
68+
The return statement is a multi-lined string with items separated by newlines.
69+
(see HINTS.md for an example).
5370
54-
(see HINTS.md for an example).
5571
"""
5672

5773
pass

0 commit comments

Comments
 (0)