1313def clean_ingredients (dish_name , dish_ingredients ):
1414 """Remove duplicates from `dish_ingredients`.
1515
16- :param dish_name: str - containing the dish name.
17- :param dish_ingredients: list - dish ingredients.
18- :return: tuple - containing (dish_name, ingredient set).
16+ Parameters:
17+ dish_name (str): The name of the dish.
18+ dish_ingredients (list): The ingredients for the dish.
19+
20+ Returns:
21+ tuple: Containing (dish_name, ingredient set).
1922
2023 This function should return a `tuple` with the name of the dish as the first item,
2124 followed by the de-duped `set` of ingredients as the second item.
@@ -27,13 +30,15 @@ def clean_ingredients(dish_name, dish_ingredients):
2730def check_drinks (drink_name , drink_ingredients ):
2831 """Append "Cocktail" (alcohol) or "Mocktail" (no alcohol) to `drink_name`, based on `drink_ingredients`.
2932
30- :param drink_name: str - name of the drink.
31- :param drink_ingredients: list - ingredients in the drink.
32- :return: str - drink_name appended with "Mocktail" or "Cocktail".
33+ Parameters:
34+ drink_name (str): Name of the drink.
35+ drink_ingredients (list): Ingredients in the drink.
36+
37+ Returns:
38+ str: drink_name appended with "Mocktail" or "Cocktail".
3339
3440 The function should return the name of the drink followed by "Mocktail" (non-alcoholic) and drink
3541 name followed by "Cocktail" (includes alcohol).
36-
3742 """
3843
3944 pass
@@ -42,14 +47,16 @@ def check_drinks(drink_name, drink_ingredients):
4247def categorize_dish (dish_name , dish_ingredients ):
4348 """Categorize `dish_name` based on `dish_ingredients`.
4449
45- :param dish_name: str - dish to be categorized.
46- :param dish_ingredients: set - ingredients for the dish.
47- :return: str - the dish name appended with ": <CATEGORY>".
50+ Parameters:
51+ dish_name (str): The dish to be categorized.
52+ dish_ingredients (set): The ingredients for the dish.
53+
54+ Returns:
55+ str: TThe dish name appended with ": <CATEGORY>".
4856
4957 This function should return a string with the `dish name: <CATEGORY>` (which meal category the dish belongs to).
5058 `<CATEGORY>` can be any one of (VEGAN, VEGETARIAN, PALEO, KETO, or OMNIVORE).
5159 All dishes will "fit" into one of the categories imported from `sets_categories_data.py`
52-
5360 """
5461
5562 pass
@@ -58,8 +65,11 @@ def categorize_dish(dish_name, dish_ingredients):
5865def tag_special_ingredients (dish ):
5966 """Compare `dish` ingredients to `SPECIAL_INGREDIENTS`.
6067
61- :param dish: tuple - of (dish name, list of dish ingredients).
62- :return: tuple - containing (dish name, dish special ingredients).
68+ Parameters:
69+ dish (tuple): (dish name, list of dish ingredients).
70+
71+ Returns:
72+ tuple: Containing (dish name, dish special ingredients).
6373
6474 Return the dish name followed by the `set` of ingredients that require a special note on the dish description.
6575 For the purposes of this exercise, all allergens or special ingredients that need to be tracked are in the
@@ -72,8 +82,11 @@ def tag_special_ingredients(dish):
7282def compile_ingredients (dishes ):
7383 """Create a master list of ingredients.
7484
75- :param dishes: list - of dish ingredient sets.
76- :return: set - of ingredients compiled from `dishes`.
85+ Parameters:
86+ dishes (list): Dish ingredient sets.
87+
88+ Returns:
89+ set: Ingredients compiled from `dishes`.
7790
7891 This function should return a `set` of all ingredients from all listed dishes.
7992 """
@@ -84,9 +97,12 @@ def compile_ingredients(dishes):
8497def separate_appetizers (dishes , appetizers ):
8598 """Determine which `dishes` are designated `appetizers` and remove them.
8699
87- :param dishes: list - of dish names.
88- :param appetizers: list - of appetizer names.
89- :return: list - of dish names that do not appear on appetizer list.
100+ Parameters:
101+ dishes (list): Group of dish names.
102+ appetizers (list): Group of appetizer names.
103+
104+ Returns:
105+ list: Group of dish names that do not appear on appetizer list.
90106
91107 The function should return the list of dish names with appetizer names removed.
92108 Either list could contain duplicates and may require de-duping.
@@ -98,9 +114,12 @@ def separate_appetizers(dishes, appetizers):
98114def singleton_ingredients (dishes , intersection ):
99115 """Determine which `dishes` have a singleton ingredient (an ingredient that only appears once across dishes).
100116
101- :param dishes: list - of ingredient sets.
102- :param intersection: constant - can be one of `<CATEGORY>_INTERSECTIONS` constants imported from `sets_categories_data.py`.
103- :return: set - containing singleton ingredients.
117+ Parameters:
118+ dishes (list): Group of ingredient sets.
119+ intersection (constant): Can be one of `<CATEGORY>_INTERSECTIONS` constants imported from `sets_categories_data.py`.
120+
121+ Returns:
122+ set: Containing singleton ingredients.
104123
105124 Each dish is represented by a `set` of its ingredients.
106125
0 commit comments