Skip to content

Commit

Permalink
Removed surplus old TODOs and added typing to get_weight_as_int()
Browse files Browse the repository at this point in the history
  • Loading branch information
49Indium committed Oct 9, 2023
1 parent 8d82dfe commit 1867335
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions uqcsbot/utils/uq_course_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down

0 comments on commit 1867335

Please sign in to comment.