Skip to content

Conversation

@jh0ker
Copy link
Member

@jh0ker jh0ker commented Nov 12, 2017

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

@Eldinnie
Copy link
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?

Copy link
Member

@Eldinnie Eldinnie left a comment

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

telegram.utils.promise Module
=============================

.. automodule:: telegram.utils.promise
Copy link
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

telegram.utils.request Module
=============================

.. automodule:: telegram.utils.request
Copy link
Member

Choose a reason for hiding this comment

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

Autoclass aswell

"""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
Member

Choose a reason for hiding this comment

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

:obj:`callable`

Args:
pooled_function (callable): The callable that will be called concurrently.
args (list|tuple): Positional arguments for ``pooled_function``
Copy link
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`

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
Member

Choose a reason for hiding this comment

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

:obj:`dict`

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

Choose a reason for hiding this comment

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

Same as above

self._exception = None

def run(self):
"""Calls the ``pooled_function`` callable."""
Copy link
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

calculated. ``None`` means indefinite. Default is ``None``.
Returns:
Returns the return value of ``pooled_function`` or ``None`` if the ``timeout`` expires.
Copy link
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

Returns the return value of ``pooled_function`` or ``None`` if the ``timeout`` expires.
Raises:
Any exception raised by ``pooled_function``.
Copy link
Member

Choose a reason for hiding this comment

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

and here too


@property
def exception(self):
"""The exception raised by ``pooled_function`` or ``None`` if no exception has been raised
Copy link
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.

4 participants