From 38b929b973c3603e55d4cfd67232baee095b1a4c Mon Sep 17 00:00:00 2001 From: painor Date: Sun, 10 Nov 2019 11:29:43 +0100 Subject: [PATCH] Fix several typos (#1328) --- readthedocs/concepts/entities.rst | 2 +- telethon/extensions/html.py | 2 +- telethon/network/connection/connection.py | 2 +- telethon/network/connection/tcpobfuscated.py | 2 +- telethon/tl/custom/adminlogevent.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/readthedocs/concepts/entities.rst b/readthedocs/concepts/entities.rst index f51cdfe3..1a680e51 100644 --- a/readthedocs/concepts/entities.rst +++ b/readthedocs/concepts/entities.rst @@ -108,7 +108,7 @@ you're able to just do this: # This method returns a list of Dialog, which # 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() # All of these work and do the same. diff --git a/telethon/extensions/html.py b/telethon/extensions/html.py index 1bdfe177..ef5e8a34 100644 --- a/telethon/extensions/html.py +++ b/telethon/extensions/html.py @@ -126,7 +126,7 @@ def parse(html: str) -> Tuple[str, List[TypeMessageEntity]]: Parses the given HTML message and returns its stripped representation 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]). """ if not html: diff --git a/telethon/network/connection/connection.py b/telethon/network/connection/connection.py index 27869eda..bd1fde8a 100644 --- a/telethon/network/connection/connection.py +++ b/telethon/network/connection/connection.py @@ -254,7 +254,7 @@ class PacketCodec(abc.ABC): """ 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 """ tag = None diff --git a/telethon/network/connection/tcpobfuscated.py b/telethon/network/connection/tcpobfuscated.py index 6cc10094..cf2e6af5 100644 --- a/telethon/network/connection/tcpobfuscated.py +++ b/telethon/network/connection/tcpobfuscated.py @@ -25,7 +25,7 @@ class ObfuscatedIO: random = os.urandom(64) if (random[0] != 0xef and random[:4] not in keywords and - random[4:4] != b'\0\0\0\0'): + random[4:8] != b'\0\0\0\0'): break random = bytearray(random) diff --git a/telethon/tl/custom/adminlogevent.py b/telethon/tl/custom/adminlogevent.py index 930102f8..a1744017 100644 --- a/telethon/tl/custom/adminlogevent.py +++ b/telethon/tl/custom/adminlogevent.py @@ -39,7 +39,7 @@ class AdminLogEvent: @property def date(self): """ - The date when this event occured. + The date when this event occurred. """ return self.original.date