python: upgrade from .format() to f-strings

They are supported since Python 3.5.
This commit is contained in:
link2xt
2023-02-08 12:05:16 +00:00
parent 315e944b69
commit 817760a6ef
18 changed files with 72 additions and 77 deletions

View File

@@ -14,10 +14,10 @@ class EchoPlugin:
message.create_chat()
addr = message.get_sender_contact().addr
if message.is_system_message():
message.chat.send_text("echoing system message from {}:\n{}".format(addr, message))
message.chat.send_text(f"echoing system message from {addr}:\n{message}")
else:
text = message.text
message.chat.send_text("echoing from {}:\n{}".format(addr, text))
message.chat.send_text(f"echoing from {addr}:\n{text}")
@account_hookimpl
def ac_message_delivered(self, message):