Correct examples, add None as an input and output value

This commit is contained in:
chris committed 2026-02-22 07:52:48 -05:00
1 parent 7b73c23522
commit 11e7ea13a7
1 file changed
+4 -4
+4 -4
View File
@@ -2,7 +2,7 @@ from datetime import datetime
from dateutil.relativedelta import relativedelta, MO, TU, WE, FR, SA from dateutil.relativedelta import relativedelta, MO, TU, WE, FR, SA
def get_next_draw_date(game: str, from_date: str | None = None) -> str: def get_next_draw_date(game: str | None, from_date: str | None = None) -> str:
""" """
Gets the next drawing date from the current or specified date for the given game Gets the next drawing date from the current or specified date for the given game
If the current date is the next drawing date, the current date is returned If the current date is the next drawing date, the current date is returned
@@ -12,12 +12,12 @@ def get_next_draw_date(game: str, from_date: str | None = None) -> str:
:return: next drawing date :return: next drawing date
Examples: Examples:
>>> get_next_draw_date(game='mega', from_date='02/15/2026') >>> get_next_draw_date(game='megamillions', from_date='02/15/2026')
'02/17/2026' '02/17/2026'
>>> get_next_draw_date(game='power', from_date='02/15/2026') >>> get_next_draw_date(game='powerball', from_date='02/15/2026')
'02/16/2026' '02/16/2026'
""" """
return_date = '' return_date = None
return_date_format = '%m/%d/%Y' return_date_format = '%m/%d/%Y'
# if no date was specified, use today's date # if no date was specified, use today's date
if from_date is None: if from_date is None: