Skip to content

Commit

Permalink
change match statement to if statement for python 3.9 support
Browse files Browse the repository at this point in the history
  • Loading branch information
benhovinga committed May 16, 2024
1 parent 2e7f421 commit 704c334
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions aamva/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@

def country_date_format(country: str) -> str:
country = country.upper()
match country:
case "CANADA":
return ISO_FORMAT
case "MEXICO":
return ISO_FORMAT
case "USA":
return IMPERIAL_FORMAT
if country == "CANADA":
return ISO_FORMAT
elif country == "MEXICO":
return ISO_FORMAT
elif country == "USA":
return IMPERIAL_FORMAT
raise ValueError("Provided country is not supported.")


Expand Down

0 comments on commit 704c334

Please sign in to comment.