Skip to content

Commit

Permalink
Sort praw.models.helpers.LiveHelper.create arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
LilSpazJoekp committed Jan 14, 2022
1 parent 8e5b720 commit fa5abf4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion praw/models/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import TYPE_CHECKING, Generator, List, Optional, Union

from ..const import API_PATH
from ..util import _deprecate_args
from .base import PRAWBase
from .reddit.draft import Draft
from .reddit.live import LiveThread
Expand Down Expand Up @@ -187,14 +188,16 @@ def generator():

return generator()

@_deprecate_args("title", "description", "nsfw", "resources")
def create(
self,
title: str,
*,
description: Optional[str] = None,
nsfw: bool = False,
resources: str = None,
) -> "praw.models.LiveThread":
r"""Create a new :class:`.LiveThread`.
"""Create a new :class:`.LiveThread`.
:param title: The title of the new :class:`.LiveThread`.
:param description: The new :class:`.LiveThread`'s description.
Expand Down
4 changes: 2 additions & 2 deletions praw/reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,11 @@ def request(self, *args, **kwargs):
"""An instance of :class:`.LiveHelper`.
Provides the interface for working with :class:`.LiveThread` instances. At
present only new LiveThreads can be created.
present only new live threads can be created.
.. code-block:: python
reddit.live.create("title", "description")
reddit.live.create(title="title", description="description")
"""

Expand Down

0 comments on commit fa5abf4

Please sign in to comment.