Skip to content

Add missing docs utils - #912

Merged
Eldinnie merged 6 commits into
masterfrom
missing-docs-utils
Mar 5, 2018
Merged

Add missing docs utils#912
Eldinnie merged 6 commits into
masterfrom
missing-docs-utils

Conversation

@jh0ker

@jh0ker jh0ker commented Nov 12, 2017

Copy link
Copy Markdown
Member

Adds documentation files for telegram.utils.promise and telegram.utils.request and some new docstrings/improvements.

@Eldinnie

Copy link
Copy Markdown
Member

Can we add the docs modification needed for Filters.status_update.new_chat_members in here? There's a place were it;s missing an s if i'm not mistaken?

@Eldinnie Eldinnie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments. Some are debatable

Comment thread docs/source/telegram.utils.promise.rst Outdated
telegram.utils.promise Module
=============================

.. automodule:: telegram.utils.promise

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be autoclass

Comment thread docs/source/telegram.utils.request.rst Outdated
telegram.utils.request Module
=============================

.. automodule:: telegram.utils.request

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Autoclass aswell

Comment thread telegram/utils/promise.py Outdated
"""A simple Promise implementation for use with the run_async decorator, DelayQueue etc.

Args:
pooled_function (callable): The callable that will be called concurrently.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:obj:`callable`

Comment thread telegram/utils/promise.py Outdated

Args:
pooled_function (callable): The callable that will be called concurrently.
args (list|tuple): Positional arguments for ``pooled_function``

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:obj:`list`|:obj:`tuple`

Comment thread telegram/utils/promise.py Outdated
Args:
pooled_function (callable): The callable that will be called concurrently.
args (list|tuple): Positional arguments for ``pooled_function``
kwargs (dict): Keyword arguments for ``pooled_function``

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:obj:`dict`

Comment thread telegram/utils/promise.py Outdated

Attributes:
pooled_function (callable): The callable that will be called concurrently.
args (list|tuple): Positional arguments for ``pooled_function``

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Comment thread telegram/utils/promise.py Outdated
self._exception = None

def run(self):
"""Calls the ``pooled_function`` callable."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can add : attr:`pooled_function` here

Comment thread telegram/utils/promise.py Outdated
calculated. ``None`` means indefinite. Default is ``None``.

Returns:
Returns the return value of ``pooled_function`` or ``None`` if the ``timeout`` expires.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:attr:`pooled_function` again

Comment thread telegram/utils/promise.py Outdated
Returns the return value of ``pooled_function`` or ``None`` if the ``timeout`` expires.

Raises:
Any exception raised by ``pooled_function``.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here too

Comment thread telegram/utils/promise.py Outdated

@property
def exception(self):
"""The exception raised by ``pooled_function`` or ``None`` if no exception has been raised

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here

@python-telegram-bot python-telegram-bot deleted a comment from codecov Bot Dec 20, 2017
@python-telegram-bot python-telegram-bot deleted a comment from codecov Bot Dec 20, 2017
@python-telegram-bot python-telegram-bot deleted a comment from codecov Bot Dec 20, 2017
@python-telegram-bot python-telegram-bot deleted a comment from codecov Bot Dec 20, 2017
@jsmnbom jsmnbom added the 📋 pending-reply work status: pending-reply label Dec 29, 2017
@python-telegram-bot python-telegram-bot deleted a comment from codecov Bot Mar 3, 2018
@Eldinnie Eldinnie added 📋 pending-merge work status: pending-merge and removed 📋 pending-reply work status: pending-reply labels Mar 3, 2018
@Eldinnie
Eldinnie merged commit 5956aae into master Mar 5, 2018
@Eldinnie
Eldinnie deleted the missing-docs-utils branch March 5, 2018 11:18
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

📋 pending-merge work status: pending-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants