Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
get_distance handles Swedish Relay code
  • Loading branch information
JAHDavis authored Jun 13, 2024
1 parent 4e9bf27 commit a78bca7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions athlib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def get_distance(discipline: str) -> Optional[int]:
if m:
g2 = m.group(2).upper()
if g2 in ['RELAY', 'DMR', 'SMR']: return None #cowardly refusing to guess
if g2 == "SWR": return 1000
return int(m.group(1))*int(g2.rstrip('hH'))

m = PAT_LEADING_FLOAT.match(discipline)
Expand Down

0 comments on commit a78bca7

Please sign in to comment.