Skip to content

Commit 397ef45

Browse files
authored
RUF010: Avoid calling str() within an f-string (#2871)
1 parent b03fcc7 commit 397ef45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pygmt/clib/session.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,15 +772,15 @@ def _parse_constant(self, constant, valid, valid_modifiers=None):
772772
)
773773
if name not in valid:
774774
raise GMTInvalidInput(
775-
f"Invalid constant argument '{name}'. Must be one of {str(valid)}."
775+
f"Invalid constant argument '{name}'. Must be one of {valid}."
776776
)
777777
if (
778778
nmodifiers > 0
779779
and valid_modifiers is not None
780780
and parts[1] not in valid_modifiers
781781
):
782782
raise GMTInvalidInput(
783-
f"Invalid constant modifier '{parts[1]}'. Must be one of {str(valid_modifiers)}."
783+
f"Invalid constant modifier '{parts[1]}'. Must be one of {valid_modifiers}."
784784
)
785785
integer_value = sum(self[part] for part in parts)
786786
return integer_value

0 commit comments

Comments
 (0)