Skip to content

Commit

Permalink
Sort praw.models.reddit.subreddit.ModeratorRelationship.add arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
LilSpazJoekp committed Jan 8, 2022
1 parent 9077420 commit b560143
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions praw/models/reddit/subreddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
TooLargeMediaException,
WebSocketException,
)
from ...util.cache import cachedproperty
from ...util import _deprecate_args, cachedproperty
from ..listing.generator import ListingGenerator
from ..listing.mixins import SubredditListingMixin
from ..util import permissions_string, stream_generator
Expand Down Expand Up @@ -2964,9 +2964,11 @@ def __call__(
return self.subreddit._reddit.get(url, params=params)

# pylint: disable=arguments-differ
@_deprecate_args("redditor", "permissions")
def add(
self,
redditor: Union[str, "praw.models.Redditor"],
*,
permissions: Optional[List[str]] = None,
**other_settings: Any,
):
Expand All @@ -2976,16 +2978,16 @@ def add(
:param permissions: When provided (not ``None``), permissions should be a list
of strings specifying which subset of permissions to grant. An empty list
``[]`` indicates no permissions, and when not provided ``None``, indicates
full permissions.
full permissions (default: ``None``).
An invite will be sent unless the user making this call is an admin user.
For example, to invite ``"spez"`` with ``"posts"`` and ``"mail"`` permissions to
For example, to invite u/spez with ``"posts"`` and ``"mail"`` permissions to
r/test, try:
.. code-block:: python
reddit.subreddit("test").moderator.add("spez", ["posts", "mail"])
reddit.subreddit("test").moderator.add("spez", permissions=["posts", "mail"])
"""
other_settings = self._handle_permissions(permissions, other_settings)
Expand Down

0 comments on commit b560143

Please sign in to comment.