1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-07-07 11:42:38 +02:00

Minor documentation improvements

- List all __init__ methods in documentation
- Further describe purpose of Profile in its docstring
This commit is contained in:
Alexander Graf 2018-03-18 17:19:22 +01:00
parent 760688d9e6
commit 4a2e32790a
2 changed files with 15 additions and 0 deletions

View File

@ -362,3 +362,14 @@ current_release = subprocess.check_output(["git", "describe", "--abbrev=0"]).dec
current_release_date = subprocess.check_output(["git", "log", "-1", "--tags", "--format=%ad", "--date=format:%e %b %Y"]).decode("ascii")[:-1]
html_context = {'current_release': current_release, 'current_release_date': current_release_date}
def skip(app, what, name, obj, skip, options):
# Ensure constructors are documented
if name == "__init__":
return False
return skip
def setup(app):
app.connect('autodoc-skip-member', skip)

View File

@ -427,6 +427,9 @@ class Profile:
"""
An Instagram Profile.
Provides methods for accessing profile properties, as well as :meth:`Profile.get_posts` and for own profile
:meth:`Profile.get_saved_posts`.
Instances are linked to an :class:`Instaloader` instance. This class implements == and is hashable.
"""
def __init__(self, instaloader: 'Instaloader', identifier: Union[str, int]):
@ -603,6 +606,7 @@ class Instaloader:
download_comments: Tristate = Tristate.no_extra_query,
save_metadata: Tristate = Tristate.never,
max_connection_attempts: int = 3):
"""Instaloader."""
# configuration parameters
self.user_agent = user_agent if user_agent is not None else default_user_agent()