diff --git a/pythonosc/osc_bundle_builder.py b/pythonosc/osc_bundle_builder.py index bf42664..ee28d6f 100644 --- a/pythonosc/osc_bundle_builder.py +++ b/pythonosc/osc_bundle_builder.py @@ -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: diff --git a/pythonosc/osc_message_builder.py b/pythonosc/osc_message_builder.py index fc4a035..ebbc2cb 100644 --- a/pythonosc/osc_message_builder.py +++ b/pythonosc/osc_message_builder.py @@ -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)