diff --git a/app/main.py b/app/main.py index 8fc787b5..480197db 100644 --- a/app/main.py +++ b/app/main.py @@ -1,15 +1,18 @@ +from typing import Dict + + class OnlineCourse: - def __init__(self, name, description, weeks): + def __init__(self, name: str, description: str, weeks: str): self.name = name self.description = description self.weeks = weeks @staticmethod - def days_to_weeks(days): + def days_to_weeks(days: int) -> int: return (days + 6) // 7 @classmethod - def from_dict(cls, course_dict): + def from_dict(cls, course_dict: Dict[str, str]) - "OnlineCourse": name = course_dict["name"] description = course_dict["description"] days = course_dict["days"]