From f5c1fd8d3659500f495d004c003455a1c81bc84f Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sun, 8 Nov 2020 21:43:17 +0000 Subject: [PATCH] Format code with black, autopep8 and isort This commit fixes the style issues introduced in b8cd2b6 according to the output from black, autopep8 and isort. Details: https://deepsource.io/gh/muhammedfurkan/aiogram/transform/8bd8f95c-12e5-4b22-94da-4d44c3c3adfb/ --- aiogram/types/message_entity.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/aiogram/types/message_entity.py b/aiogram/types/message_entity.py index 3f68a6c9..f5b372a5 100644 --- a/aiogram/types/message_entity.py +++ b/aiogram/types/message_entity.py @@ -48,10 +48,12 @@ class MessageEntity(base.TelegramObject): :return: part of text """ if sys.maxunicode == 0xFFFF: - return text[self.offset : self.offset + self.length] + return text[self.offset: self.offset + self.length] - entity_text = text.encode("utf-16-le") if not isinstance(text, bytes) else text - entity_text = entity_text[self.offset * 2 : (self.offset + self.length) * 2] + entity_text = text.encode( + "utf-16-le") if not isinstance(text, bytes) else text + entity_text = entity_text[self.offset * + 2: (self.offset + self.length) * 2] return entity_text.decode("utf-16-le") @deprecated( @@ -130,4 +132,4 @@ class MessageEntityType(helper.Helper): UNDERLINE = helper.Item() # underline STRIKETHROUGH = helper.Item() # strikethrough TEXT_LINK = helper.Item() # text_link - for clickable text URLs - TEXT_MENTION = helper.Item() # text_mention - for users without usernames \ No newline at end of file + TEXT_MENTION = helper.Item() # text_mention - for users without usernames