app/classes.py
Showing 3 of 3 total issues
Function create_shopping_list
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def create_shopping_list(self, name, description, user_email): """This method creates a shopping list for a user""" # Check if required input parameter is missing if name is None or description is None or user_email is None: raise Exception("Missing Field:Please provide name & Description")
- Read upRead up
Function user_update_item_in_list
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def user_update_item_in_list(self, shopping_list, list_item, item_name,
Function edit_shopping_list
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def edit_shopping_list(self, id, user_email, name=None, description=None): """This method edits the shopping list at index id and email""" # Make sure the list we are editing exists if user_email not in self.shopping_lists: raise Exception("Oops! List does not exist in User's records")
- Read upRead up