diff --git a/README.rst b/README.rst
index 18798325..0cacfa67 100755
--- a/README.rst
+++ b/README.rst
@@ -70,10 +70,10 @@ If you've installed Telethon via pip, launch an interactive python3 session and
.. code:: python
>>> from telethon import InteractiveTelegramClient
- >>> # 'sessionid' can be 'yourname'. It'll be saved as yourname.session
+ >>> # 'session_id' can be 'your_name'. It'll be saved as your_name.session
>>> # Also (obviously) replace the api_id and api_hash with your values
...
- >>> client = InteractiveTelegramClient('sessionid', '+34600000000',
+ >>> client = InteractiveTelegramClient('session_id', '+34600000000',
... api_id=12345, api_hash='0123456789abcdef0123456789abcdef')
==================
@@ -93,7 +93,7 @@ Then, simply run ``python3 try_telethon.py`` to start the interactive example.
Using Telethon
==============
-If you really want to learn how to use Telethon, it is **highly adviced** that
+If you really want to learn how to use Telethon, it is **highly advised** that
you take a look to the
`InteractiveTelegramClient `_ file
and check how it works. This file contains everything you'll need to build
@@ -208,7 +208,7 @@ Once this is done, pass the proxy settings to the ``TelegramClient`` constructor
>>> from telethon import InteractiveTelegramClient
>>> import socks
- >>> client = InteractiveTelegramClient('sessionid', '+34600000000',
+ >>> client = InteractiveTelegramClient('session_id', '+34600000000',
... api_id=12345, api_hash='0123456789abcdef0123456789abcdef',
... proxy=(socks.SOCKS5, 'localhost', 4444))
diff --git a/docs/generate.py b/docs/generate.py
index 096ddceb..f7fd2e50 100755
--- a/docs/generate.py
+++ b/docs/generate.py
@@ -63,20 +63,20 @@ def get_create_path_for(tlobject):
return os.path.join(out_dir, get_file_name(tlobject, add_extension=True))
-def get_path_for_type(type, relative_to='.'):
+def get_path_for_type(type_, relative_to='.'):
"""Similar to getting the path for a TLObject, it might not be possible
to have the TLObject itself but rather its name (the type);
this method works in the same way, returning a relative path"""
- if type.lower() in {'int', 'long', 'int128', 'int256', 'double',
- 'vector', 'string', 'bool', 'true', 'bytes', 'date'}:
- path = 'index.html#%s' % type.lower()
+ if type_.lower() in {'int', 'long', 'int128', 'int256', 'double',
+ 'vector', 'string', 'bool', 'true', 'bytes', 'date'}:
+ path = 'index.html#%s' % type_.lower()
- elif '.' in type:
+ elif '.' in type_:
# If it's not a core type, then it has to be a custom Telegram type
- namespace, name = type.split('.')
+ namespace, name = type_.split('.')
path = 'types/%s/%s' % (namespace, get_file_name(name, add_extension=True))
else:
- path = 'types/%s' % get_file_name(type, add_extension=True)
+ path = 'types/%s' % get_file_name(type_, add_extension=True)
return get_relative_path(path, relative_to)
@@ -128,7 +128,7 @@ def build_menu(docs, filename, relative_main_index):
def generate_index(folder, original_paths):
"""Generates the index file for the specified folder"""
- # Determine the namespaces listed here (as subfolders)
+ # Determine the namespaces listed here (as sub folders)
# and the files (.html files) that we should link to
namespaces = []
files = []
@@ -320,10 +320,10 @@ def generate_documentation(scheme_file):
docs.write_text('The following %d methods return this type as a result.' % len(functions))
docs.begin_table(2)
- for function in functions:
- link = get_create_path_for(function)
+ for func in functions:
+ link = get_create_path_for(func)
link = get_relative_path(link, relative_to=filename)
- docs.add_row(get_class_name(function), link=link)
+ docs.add_row(get_class_name(func), link=link)
docs.end_table()
docs.end_body()
diff --git a/docs/res/core.html b/docs/res/core.html
index fff04fa0..713c16bf 100644
--- a/docs/res/core.html
+++ b/docs/res/core.html
@@ -188,6 +188,7 @@ messages = result.messages
you're still able to invoke these methods manually.
+