Skip to content

Commit

Permalink
fixing string formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
PhillipsOwen committed Nov 21, 2024
1 parent 697d26e commit 428b7f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/common/geopoints_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,12 @@ def generate_six_hour_time_advisories_from_range(advisory_range) -> list:

list_of_advisories = []
for inc in range(start_adv, stop_adv):
list_of_advisories.append(f'{inc: 02d}')
list_of_advisories.append(f'{inc:02d}')

list_of_advisories = [i for i in list_of_advisories if int(i) > 0]

# Should we retain the input value?
list_of_advisories.append(f'{stop_adv: 02d}')
list_of_advisories.append(f'{stop_adv:02d}')

# A last ditch sort to be sure
list_of_advisories.sort()
Expand Down Expand Up @@ -677,12 +677,12 @@ def generate_six_hour_time_advisories_from_offset(str_time, offset) -> list:
range_values.sort() # sorts ascending order

for inc in range(*range_values):
list_of_advisories.append(f'{stop_advisory + inc: 02d}')
list_of_advisories.append(f'{stop_advisory + inc:02d}')

list_of_advisories = [i for i in list_of_advisories if int(i) >= 0]

# Keep the input value?
list_of_advisories.append(f'{stop_advisory: 02d}')
list_of_advisories.append(f'{stop_advisory:02d}')

# A last ditch sort to be sure
list_of_advisories.sort()
Expand Down

0 comments on commit 428b7f8

Please sign in to comment.