mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Merge pull request #9 from muhammedfurkan/deepsource-transform-b0141be3
Format code with black, autopep8 and isort
This commit is contained in:
commit
44cd1fd974
1 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue