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: 8bd8f95c-12e5-4b22-94da-4d44c3c3adfb/
This commit is contained in:
deepsource-autofix[bot] 2020-11-08 21:43:17 +00:00 committed by GitHub
parent b8cd2b61c7
commit f5c1fd8d36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
TEXT_MENTION = helper.Item() # text_mention - for users without usernames