mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-14 18:43:11 +03:00
Fix several typos (#1328)
This commit is contained in:
parent
4a1310dc21
commit
38b929b973
|
@ -108,7 +108,7 @@ you're able to just do this:
|
||||||
# This method returns a list of Dialog, which
|
# This method returns a list of Dialog, which
|
||||||
# has the .entity attribute and other information.
|
# has the .entity attribute and other information.
|
||||||
#
|
#
|
||||||
# This part is IMPORTANT, because it feels the entity cache.
|
# This part is IMPORTANT, because it fills the entity cache.
|
||||||
dialogs = await client.get_dialogs()
|
dialogs = await client.get_dialogs()
|
||||||
|
|
||||||
# All of these work and do the same.
|
# All of these work and do the same.
|
||||||
|
|
|
@ -126,7 +126,7 @@ def parse(html: str) -> Tuple[str, List[TypeMessageEntity]]:
|
||||||
Parses the given HTML message and returns its stripped representation
|
Parses the given HTML message and returns its stripped representation
|
||||||
plus a list of the MessageEntity's that were found.
|
plus a list of the MessageEntity's that were found.
|
||||||
|
|
||||||
:param message: the message with HTML to be parsed.
|
:param html: the message with HTML to be parsed.
|
||||||
:return: a tuple consisting of (clean message, [message entities]).
|
:return: a tuple consisting of (clean message, [message entities]).
|
||||||
"""
|
"""
|
||||||
if not html:
|
if not html:
|
||||||
|
|
|
@ -254,7 +254,7 @@ class PacketCodec(abc.ABC):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
This attribute should be re-defined by subclass to define if some
|
This attribute should be re-defined by subclass to define if some
|
||||||
"magic bytes" should be sent to server right after conection is made to
|
"magic bytes" should be sent to server right after connection is made to
|
||||||
signal which protocol will be used
|
signal which protocol will be used
|
||||||
"""
|
"""
|
||||||
tag = None
|
tag = None
|
||||||
|
|
|
@ -25,7 +25,7 @@ class ObfuscatedIO:
|
||||||
random = os.urandom(64)
|
random = os.urandom(64)
|
||||||
if (random[0] != 0xef and
|
if (random[0] != 0xef and
|
||||||
random[:4] not in keywords and
|
random[:4] not in keywords and
|
||||||
random[4:4] != b'\0\0\0\0'):
|
random[4:8] != b'\0\0\0\0'):
|
||||||
break
|
break
|
||||||
|
|
||||||
random = bytearray(random)
|
random = bytearray(random)
|
||||||
|
|
|
@ -39,7 +39,7 @@ class AdminLogEvent:
|
||||||
@property
|
@property
|
||||||
def date(self):
|
def date(self):
|
||||||
"""
|
"""
|
||||||
The date when this event occured.
|
The date when this event occurred.
|
||||||
"""
|
"""
|
||||||
return self.original.date
|
return self.original.date
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user