Skip to content

Commit

Permalink
Fix remaining .format() calls to f-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Oct 15, 2024
1 parent c140c8e commit 7845596
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions pythonosc/osc_bundle_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ def build(self) -> osc_bundle.OscBundle:
dgram += content.dgram
else:
raise BuildError(
"Content must be either OscBundle or OscMessage"
"found {}".format(type(content))
f"Content must be either OscBundle or OscMessage, found {type(content)}"
)
return osc_bundle.OscBundle(dgram)
except osc_types.BuildError as be:
Expand Down
4 changes: 1 addition & 3 deletions pythonosc/osc_message_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ def add_arg(self, arg_value: ArgValue, arg_type: Optional[str] = None) -> None:
"""
if arg_type and not self._valid_type(arg_type):
raise ValueError(
"arg_type must be one of {}, or an array of valid types".format(
self._SUPPORTED_ARG_TYPES
)
f"arg_type must be one of {self._SUPPORTED_ARG_TYPES}, or an array of valid types"
)
if not arg_type:
arg_type = self._get_arg_type(arg_value)
Expand Down

0 comments on commit 7845596

Please sign in to comment.