From 1867335f514fa4ed2d6c3b01fc78a2d9722b4515 Mon Sep 17 00:00:00 2001 From: Isaac Beh Date: Mon, 9 Oct 2023 17:30:28 +1000 Subject: [PATCH] Removed surplus old TODOs and added typing to get_weight_as_int() --- uqcsbot/utils/uq_course_utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/uqcsbot/utils/uq_course_utils.py b/uqcsbot/utils/uq_course_utils.py index 0ef86545..93432227 100644 --- a/uqcsbot/utils/uq_course_utils.py +++ b/uqcsbot/utils/uq_course_utils.py @@ -141,10 +141,7 @@ def is_after(self, cutoff: datetime): try: start_datetime, end_datetime = self.get_parsed_due_date() except DateSyntaxException: - # TODO bot.logger.error(e.message) # If we can't parse a date, we're better off keeping it just in case. - # TODO(mitch): Keep track of these instances to attempt to accurately - # parse them in future. Will require manual detection + parsing. return True return end_datetime >= cutoff if end_datetime else start_datetime >= cutoff @@ -162,7 +159,7 @@ def is_before(self, cutoff: datetime): return True return start_datetime <= cutoff - def get_weight_as_int(self): + def get_weight_as_int(self) -> Optional[int]: """ Trys to get the weight percentage of an assessment as a percentage. Will return None if a percentage can not be obtained.