Skip to content

Commit

Permalink
replace rstrip() with removesuffix()
Browse files Browse the repository at this point in the history
  • Loading branch information
Iara Ota committed Jul 5, 2024
1 parent 4ecb502 commit e1904c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gwsumm/plot/triggers/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def add_loudest_event(self, ax, table, rank, *columns, **kwargs):
colstr = get_column_string(col)
# format row value
try:
valstr = f"{row[col]:.2f}".rstrip('.0')
valstr = f"{row[col]:.2f}".removesuffix('.00')

Check warning on line 299 in gwsumm/plot/triggers/core.py

View check run for this annotation

Codecov / codecov/patch

gwsumm/plot/triggers/core.py#L299

Added line #L299 was not covered by tests
except ValueError: # not float()able
valstr = str(row[col])
txt.append(f'{colstr} = {valstr}')
Expand Down

0 comments on commit e1904c6

Please sign in to comment.