From c140c8eb806809c6f818b5593a30cf1727817514 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Tue, 15 Oct 2024 11:27:07 +0300 Subject: [PATCH] Run `flynt -tc` to transform concatenation to f-strings --- pythonosc/dispatcher.py | 2 +- pythonosc/osc_message_builder.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonosc/dispatcher.py b/pythonosc/dispatcher.py index c3996a7..680f26d 100644 --- a/pythonosc/dispatcher.py +++ b/pythonosc/dispatcher.py @@ -201,7 +201,7 @@ def handlers_for_address( pattern = pattern.replace("\\*", "[\\w|\\+]*") # The rest of the syntax in the specification is like the re module so # we're fine. - pattern = pattern + "$" + pattern = f"{pattern}$" patterncompiled = re.compile(pattern) matched = False diff --git a/pythonosc/osc_message_builder.py b/pythonosc/osc_message_builder.py index 64c354c..fc4a035 100644 --- a/pythonosc/osc_message_builder.py +++ b/pythonosc/osc_message_builder.py @@ -161,7 +161,7 @@ def build(self) -> osc_message.OscMessage: # Write the parameters. arg_types = "".join([arg[0] for arg in self._args]) - dgram += osc_types.write_string("," + arg_types) + dgram += osc_types.write_string(f",{arg_types}") for arg_type, value in self._args: if arg_type == self.ARG_TYPE_STRING: dgram += osc_types.write_string(value) # type: ignore[arg-type]