Skip to content

Commit a81fe27

Browse files
committed
docs and None
1 parent 83c8517 commit a81fe27

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

discord/ext/tasks/__init__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ def loop(
744744
time: datetime.time | Sequence[datetime.time] = MISSING,
745745
count: int | None = None,
746746
reconnect: bool = True,
747-
loop: asyncio.AbstractEventLoop = MISSING,
747+
loop: asyncio.AbstractEventLoop | None = None,
748748
name: str | None = MISSING,
749749
) -> Callable[[LF], Loop[LF]]:
750750
"""A decorator that schedules a task in the background for you with
@@ -778,9 +778,15 @@ def loop(
778778
Whether to handle errors and restart the task
779779
using an exponential back-off algorithm similar to the
780780
one used in :meth:`discord.Client.connect`.
781-
loop: :class:`asyncio.AbstractEventLoop`
782-
The loop to use to register the task, if not given
783-
defaults to :func:`asyncio.get_event_loop`.
781+
loop: Optional[:class:`asyncio.AbstractEventLoop`]
782+
The loop to use to register the task, defaults to ``None``.
783+
784+
.. versionchanged:: 2.7
785+
This can now be ``None``
786+
name: Optional[:class:`str`]
787+
The name to create the task with, defaults to ``None``.
788+
789+
.. versionadded:: 2.7
784790
785791
Raises
786792
------

0 commit comments

Comments
 (0)