Skip to content

Commit

Permalink
[558] removed superfluous string comparisons, replaced remaining peri…
Browse files Browse the repository at this point in the history
…odicity checks from `is` to `==`
  • Loading branch information
monocongo committed Sep 17, 2024
1 parent 7f6941a commit 52d69c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/climate_indices/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,9 @@ def percentage_of_normal(

# if doing monthly then we'll use 12 periods, corresponding to calendar
# months, if daily assume years w/366 days
if periodicity is compute.Periodicity.monthly:
if periodicity == compute.Periodicity.monthly:
periodicity = 12
elif periodicity is compute.Periodicity.daily:
elif periodicity == compute.Periodicity.daily:
periodicity = 366
else:
message = f"Invalid periodicity argument: '{periodicity}'"
Expand Down

0 comments on commit 52d69c1

Please sign in to comment.