Skip to content

Commit

Permalink
Format docs with docstrfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
LilSpazJoekp committed Jan 23, 2021
1 parent 06d1fbd commit 525d720
Show file tree
Hide file tree
Showing 180 changed files with 4,211 additions and 4,133 deletions.
16 changes: 8 additions & 8 deletions AUTHORS.rst
Expand Up @@ -3,7 +3,6 @@ Author/Maintainer

- Joel Payne <lilspazjoekp@gmail.com> `@LilSpazJoekp <https://github.com/lilspazjoekp>`_


Documentation Contributors
==========================

Expand All @@ -19,19 +18,16 @@ Documentation Contributors

<!-- - Add "Name <email (optional)> and github profile link" above this line. -->


PRAW Author
===========

- Bryce Boe <bbzbryce@gmail.com> `@bboe <https://github.com/bboe>`_


Logo Creator
============

- kungming2 `@kungming2 <https://github.com/kungming2>`_


Source Contributors
===================

Expand All @@ -50,9 +46,11 @@ Source Contributors
- Andrew Arnold `@asquared31415 <https://github.com/asquared31415>`_
- bakonydraco `@bakonydraco <https://github.com/bakonydraco>`_
- salehio `@salehio <https://github.com/salehio>`_
- Amanda O'Neal <amanda.oneal.dev@gmail.com> `@amandaoneal <https://github.com/amandaoneal>`_
- Amanda O'Neal <amanda.oneal.dev@gmail.com> `@amandaoneal
<https://github.com/amandaoneal>`_
- Gourari Oussama <gourari.ouss@gmail.com> `@O-Gourari <https://github.com/O-Gourari>`_
- Declan Hoare <declanhoare@exemail.com.au> `@NetwideRogue <https://github.com/NetwideRogue>`_
- Declan Hoare <declanhoare@exemail.com.au> `@NetwideRogue
<https://github.com/NetwideRogue>`_
- Elaina Martineau `@CrackedP0t <https://github.com/CrackedP0t>`_
- Rob Curtis <BourbonInExile@gmail.com> `@waab76 <https://github.com/waab76>`_
- Pyprohly <pyprohly@outlook.com> `@Pyprohly <https://github.com/Pyprohly>`_
Expand All @@ -63,11 +61,13 @@ Source Contributors
- Jack Steel `@jackodsteel <https://github.com/jackodsteel>`_
- David Mirch `@fwump38 <https://github.com/fwump38>`_
- PythonCoderAS `@PythonCoderAS <https://github.com/PythonCoderAS>`_
- Michael Cetrulo <contact@michael-cetrulo.com> `@git2samus <https://github.com/git2samus>`_
- Michael Cetrulo <contact@michael-cetrulo.com> `@git2samus
<https://github.com/git2samus>`_
- George Schizas `@gschizas <https://github.com/gschizas>`_
- Todd Roberts `@toddrob99 <https://github.com/toddrob99>`_
- MaybeNetwork `@MaybeNetwork <https://github.com/MaybeNetwork>`_
- Nick Kelly `@nickatnight <https://github.com/nickatnight>`_
- Gerard Rodes <GerardRodesVidal@gmail.com> `@GerardRodes <https://github.com/GerardRodes>`_
- Gerard Rodes <GerardRodesVidal@gmail.com> `@GerardRodes
<https://github.com/GerardRodes>`_

<!-- - Add "Name <email (optional)> and github profile link" above this line. -->
40 changes: 19 additions & 21 deletions CHANGES.rst
Expand Up @@ -6,47 +6,45 @@ Unreleased

**Added**

* Add method :meth:`~.Subreddits.premium` to reflect the naming change in Reddit's API.
* Ability to submit image galleries with :meth:`.submit_gallery`.
* Ability to pass a gallery url to :meth:`.Reddit.submission`.
* Ability to specify modmail mute duration.
* Add method :meth:`.invited` to get invited moderators of a subreddit.
* Add method :meth:`~.Submission.award` and :meth:`~.Comment.award` with the ability to
- Add method :meth:`~.Subreddits.premium` to reflect the naming change in Reddit's API.
- Ability to submit image galleries with :meth:`.submit_gallery`.
- Ability to pass a gallery url to :meth:`.Reddit.submission`.
- Ability to specify modmail mute duration.
- Add method :meth:`.invited` to get invited moderators of a subreddit.
- Add method :meth:`~.Submission.award` and :meth:`~.Comment.award` with the ability to
specify type of award, anonymity, and message when awarding a submission or comment.
* Ability to submit text/self posts with inline media.
* Added :meth:`.Reddit.close` to close the requestor session.
* Ability to use :class:`.Reddit` as an asynchronous context manager that automatically
- Ability to submit text/self posts with inline media.
- Added :meth:`.Reddit.close` to close the requestor session.
- Ability to use :class:`.Reddit` as an asynchronous context manager that automatically
closes the requestor session on exit.

**Changed**

* :class:`~.BoundedSet` will now utilize a Last-Recently-Used (LRU) storing mechanism,
- :class:`~.BoundedSet` will now utilize a Last-Recently-Used (LRU) storing mechanism,
which will change the order in which elements are removed from the set.

**Deprecated**

* :meth:`~.Subreddits.gold` is superseded by :meth:`~.Subreddits.premium`.
* :meth:`~.Submission.gild` is superseded by :meth:`~.Submission.award`.
* :meth:`~.Comment.gild` is superseded by :meth:`~.Comment.award`.
- :meth:`~.Subreddits.gold` is superseded by :meth:`~.Subreddits.premium`.
- :meth:`~.Submission.gild` is superseded by :meth:`~.Submission.award`.
- :meth:`~.Comment.gild` is superseded by :meth:`~.Comment.award`.

**Fixed**

* A bug where if you call `.parent()` on a comment it clears its replies.
* An issue where performing a deepcopy on an :class:`.RedditBase` object will fail.
* Some cases where streams yield the same item multiple times. This cannot be
prevented in every case.
- A bug where if you call `.parent()` on a comment it clears its replies.
- An issue where performing a deepcopy on an :class:`.RedditBase` object will fail.
- Some cases where streams yield the same item multiple times. This cannot be prevented
in every case.

7.1.0 (2020/07/16)
------------------

* First official Async PRAW release!

- First official Async PRAW release!

7.1.0.pre1 (2020/07/16)
-----------------------

* Initial Async PRAW pre release.

- Initial Async PRAW pre release.

For changes in PRAW please see: `PRAW Changelog
<https://praw.readthedocs.io/en/latest/pages/changelog.html>`_
112 changes: 63 additions & 49 deletions README.rst
Expand Up @@ -2,38 +2,43 @@ Async PRAW: The Asynchronous Python Reddit API Wrapper
======================================================

.. image:: https://img.shields.io/pypi/v/asyncpraw.svg
:alt: Latest asyncpraw Version
:target: https://pypi.python.org/pypi/asyncpraw
:alt: Latest asyncpraw Version
:target: https://pypi.python.org/pypi/asyncpraw

.. image:: https://img.shields.io/pypi/pyversions/asyncpraw
:alt: Supported Python Versions
:target: https://pypi.python.org/pypi/asyncpraw
:alt: Supported Python Versions
:target: https://pypi.python.org/pypi/asyncpraw

.. image:: https://img.shields.io/pypi/dm/asyncpraw
:alt: PyPI - Downloads - Monthly
:target: https://pypi.python.org/pypi/asyncpraw
:alt: PyPI - Downloads - Monthly
:target: https://pypi.python.org/pypi/asyncpraw

.. image:: https://coveralls.io/repos/github/praw-dev/asyncpraw/badge.svg?branch=master
:alt: Coveralls Coverage
:target: https://coveralls.io/github/praw-dev/asyncpraw?branch=master
:alt: Coveralls Coverage
:target: https://coveralls.io/github/praw-dev/asyncpraw?branch=master

.. image:: https://github.com/praw-dev/asyncpraw/workflows/CI/badge.svg
:alt: Github Actions Coverage
:target: https://github.com/praw-dev/asyncpraw/actions?query=branch%3Amaster
:alt: Github Actions Coverage
:target: https://github.com/praw-dev/asyncpraw/actions?query=branch%3Amaster

.. image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg
:alt: Contributor Covenant
:target: https://github.com/praw-dev/asyncpraw/blob/master/CODE_OF_CONDUCT.md
:alt: Contributor Covenant
:target: https://github.com/praw-dev/asyncpraw/blob/master/CODE_OF_CONDUCT.md

Async PRAW, an abbreviation for "Asynchronous Python Reddit API Wrapper", is a Python package that
allows for simple access to Reddit's API. Async PRAW aims to be easy to use and
internally follows all of `Reddit's API rules
Async PRAW, an abbreviation for "Asynchronous Python Reddit API Wrapper", is a Python
package that allows for simple access to Reddit's API. Async PRAW aims to be easy to use
and internally follows all of `Reddit's API rules
<https://github.com/reddit/reddit/wiki/API>`_. With Async PRAW there's no need to
introduce ``sleep`` calls in your code. Give your client an appropriate user
agent and you're set.
introduce ``sleep`` calls in your code. Give your client an appropriate user agent and
you're set.

.. _installation:

Installation
------------

Async PRAW is supported on Python 3.6+. The recommended way to
install Async PRAW is via `pip <https://pypi.python.org/pypi/pip>`_.
Async PRAW is supported on Python 3.6+. The recommended way to install Async PRAW is via
`pip <https://pypi.python.org/pypi/pip>`_.

.. code-block:: bash
Expand All @@ -45,22 +50,26 @@ To install the latest development version of Async PRAW run the following instea
pip install --upgrade https://github.com/praw-dev/asyncpraw/archive/master.zip
For instructions on installing Python and pip see "The Hitchhiker's Guide to
Python" `Installation Guides
<https://docs.python-guide.org/en/latest/starting/installation/>`_.
For instructions on installing Python and pip see "The Hitchhiker's Guide to Python"
`Installation Guides <https://docs.python-guide.org/en/latest/starting/installation/>`_.

Quickstart
----------

Assuming you already have a credentials for a script-type OAuth application you
can instantiate an instance of Async PRAW like so:
Assuming you already have a credentials for a script-type OAuth application you can
instantiate an instance of Async PRAW like so:

.. code-block:: python
import asyncpraw
reddit = asyncpraw.Reddit(client_id="CLIENT_ID", client_secret="CLIENT_SECRET",
password="PASSWORD", user_agent="USERAGENT",
username="USERNAME")
reddit = asyncpraw.Reddit(
client_id="CLIENT_ID",
client_secret="CLIENT_SECRET",
password="PASSWORD",
user_agent="USERAGENT",
username="USERNAME",
)
With the ``reddit`` instance you can then interact with Reddit:

Expand All @@ -71,7 +80,9 @@ With the ``reddit`` instance you can then interact with Reddit:
await subreddit.submit("Test Submission", url="https://reddit.com")
# Comment on a known submission
submission = await reddit.submission(url="https://www.reddit.com/comments/5e1az9", lazy=True)
submission = await reddit.submission(
url="https://www.reddit.com/comments/5e1az9", lazy=True
)
await submission.reply("Super rad!")
# Reply to the first comment of a weekly top thread of a moderated community
Expand All @@ -89,41 +100,43 @@ With the ``reddit`` instance you can then interact with Reddit:
async for moderator in subreddit.moderator:
print(moderator)
Please see Async PRAW's `documentation <https://asyncpraw.readthedocs.io/>`_ for
more examples of what you can do with Async PRAW.
Please see Async PRAW's `documentation <https://asyncpraw.readthedocs.io/>`_ for more
examples of what you can do with Async PRAW.

Async PRAW Discussion and Support
---------------------------------

For those new to Python, or would otherwise consider themselves a Python
beginner, please consider asking questions on the `r/learnpython
<https://www.reddit.com/r/learnpython>`_ subreddit. There are wonderful people
there who can help with general Python and simple Async PRAW related questions.
For those new to Python, or would otherwise consider themselves a Python beginner,
please consider asking questions on the `r/learnpython
<https://www.reddit.com/r/learnpython>`_ subreddit. There are wonderful people there who
can help with general Python and simple Async PRAW related questions.

Otherwise, there are a few official places to ask questions about Async PRAW:

`r/redditdev <https://www.reddit.com/r/redditdev>`_ is the best place on
Reddit to ask Async PRAW related questions. This subreddit is for all Reddit API
related discussion so please tag submissions with *[Async PRAW]*. Please perform a
search on the subreddit first to see if anyone has similar questions.
`r/redditdev <https://www.reddit.com/r/redditdev>`_ is the best place on Reddit to ask
Async PRAW related questions. This subreddit is for all Reddit API related discussion so
please tag submissions with *[Async PRAW]*. Please perform a search on the subreddit
first to see if anyone has similar questions.

Real-time chat can be conducted via the `PRAW Slack Organization
<https://join.slack.com/t/praw/shared_invite/enQtOTUwMDcxOTQ0NzY5LWVkMGQ3ZDk5YmQ5MDEwYTZmMmJkMTJkNjBkNTY3OTU0Y2E2NGRlY2ZhZTAzMWZmMWRiMTMwYjdjODkxOGYyZjY>`_
(please create an issue if that invite link has expired).

Please do not directly message any of the contributors via Reddit, email, or
Slack unless they have indicated otherwise. We strongly encourage everyone to
help others with their questions.
Please do not directly message any of the contributors via Reddit, email, or Slack
unless they have indicated otherwise. We strongly encourage everyone to help others with
their questions.

Please file bugs and feature requests as issues on `GitHub
<https://github.com/praw-dev/asyncpraw/issues>`_ after first searching to ensure a
similar issue was not already filed. If such an issue already exists please
give it a thumbs up reaction. Comments to issues containing additional
information are certainly welcome.
similar issue was not already filed. If such an issue already exists please give it a
thumbs up reaction. Comments to issues containing additional information are certainly
welcome.

.. note::

.. note:: This project is released with a `Contributor Code of Conduct
<https://github.com/praw-dev/asyncpraw/blob/master/CODE_OF_CONDUCT.md>`_. By
participating in this project you agree to abide by its terms.
This project is released with a `Contributor Code of Conduct
<https://github.com/praw-dev/asyncpraw/blob/master/CODE_OF_CONDUCT.md>`_. By
participating in this project you agree to abide by its terms.

Documentation
-------------
Expand All @@ -135,7 +148,8 @@ History

`February 2019
<https://github.com/praw-dev/asyncpraw/commit/55480eb3d59dc7bc3d1480d83b98c95effc77181>`_:
Joel forked PRAW and began work on Async PRAW, an asynchronous compatible version of PRAW.
Joel forked PRAW and began work on Async PRAW, an asynchronous compatible version of
PRAW.

`July 2020
<https://github.com/praw-dev/asyncpraw/commit/b8b8a4bf3618639968e8be379e85e2ff84f2307a>`_:
Expand All @@ -147,4 +161,4 @@ License
Async PRAW's source (v7.1.1+) is provided under the `Simplified BSD License
<https://github.com/praw-dev/asyncpraw/blob/30796acc29b4ba2335cf0eab414477702c29452f/LICENSE.txt>`_.

* Copyright ©, 2020, Joel Payne
- Copyright ©, 2020, Joel Payne
14 changes: 7 additions & 7 deletions asyncpraw/__init__.py
@@ -1,13 +1,13 @@
"""
Python Reddit API Wrapper.
"""Python Reddit API Wrapper.
Async PRAW, an abbreviation for "Asynchronous Python Reddit API Wrapper", is a python package that
allows for simple access to reddit's API. Async PRAW aims to be as easy to use as
possible and is designed to follow all of reddit's API rules. You have to give
a useragent, everything else is handled by Async PRAW so you needn't worry about
violating them.
Async PRAW, an abbreviation for "Asynchronous Python Reddit API Wrapper", is a python
package that allows for simple access to reddit's API. Async PRAW aims to be as easy to
use as possible and is designed to follow all of reddit's API rules. You have to give a
useragent, everything else is handled by Async PRAW so you needn't worry about violating
them.
More information about Async PRAW can be found at https://github.com/praw-dev/asyncpraw
"""

from .const import __version__ # NOQA
Expand Down

0 comments on commit 525d720

Please sign in to comment.