Following match statement used several times in your GoalSummery class.
Starting at line 154, 205, 252, 301, 457, 507, 552, 598.
example from your code
match unit_value:
case "kcal":
unit = 'calories'
case "km":
unit = 'distance'
case "min":
unit = 'duration'
To reduce the lines of code, I suggest to turn this match statement into a function. This would reduce the amount of lines in your code.
your code refactored as function get_unit
def get_unit(unit_value: str)-> str:
match unit_value:
case "kcal":
unit = 'calories'
case "km":
unit = 'distance'
case "min":
unit = 'duration'
return unit
Additional Feedback
The main.py class runs perfectly after I cloned your repository.
Following match statement used several times in your GoalSummery class. Starting at line 154, 205, 252, 301, 457, 507, 552, 598.
example from your code
To reduce the lines of code, I suggest to turn this match statement into a function. This would reduce the amount of lines in your code.
your code refactored as function get_unit
Additional Feedback
The main.py class runs perfectly after I cloned your repository.