Skip to content

Commit 7845596

Browse files
committed
Fix remaining .format() calls to f-strings
1 parent c140c8e commit 7845596

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

pythonosc/osc_bundle_builder.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ def build(self) -> osc_bundle.OscBundle:
5353
dgram += content.dgram
5454
else:
5555
raise BuildError(
56-
"Content must be either OscBundle or OscMessage"
57-
"found {}".format(type(content))
56+
f"Content must be either OscBundle or OscMessage, found {type(content)}"
5857
)
5958
return osc_bundle.OscBundle(dgram)
6059
except osc_types.BuildError as be:

pythonosc/osc_message_builder.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ def add_arg(self, arg_value: ArgValue, arg_type: Optional[str] = None) -> None:
9090
"""
9191
if arg_type and not self._valid_type(arg_type):
9292
raise ValueError(
93-
"arg_type must be one of {}, or an array of valid types".format(
94-
self._SUPPORTED_ARG_TYPES
95-
)
93+
f"arg_type must be one of {self._SUPPORTED_ARG_TYPES}, or an array of valid types"
9694
)
9795
if not arg_type:
9896
arg_type = self._get_arg_type(arg_value)

0 commit comments

Comments
 (0)