Skip to content

Commit a8350db

Browse files
committed
Fix errors in docstrings
1 parent fbb18cf commit a8350db

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

asyncio/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __next__(self):
6969
# Pause task execution for the given time (integer in milliseconds, uPy extension)
7070
# Use a SingletonGenerator to do it without allocating on the heap
7171
def sleep_ms(t, sgen=SingletonGenerator()):
72-
"""Sleep for `t` milliseconds.
72+
"""Sleep for *t* milliseconds.
7373
7474
This is a coroutine, and a MicroPython extension.
7575
"""
@@ -81,7 +81,7 @@ def sleep_ms(t, sgen=SingletonGenerator()):
8181

8282
# Pause task execution for the given time (in seconds)
8383
def sleep(t):
84-
"""Sleep for `t` seconds
84+
"""Sleep for *t* seconds
8585
8686
This is a coroutine.
8787
"""
@@ -180,7 +180,7 @@ def create_task(coro):
180180

181181
# Keep scheduling tasks until there are none left to schedule
182182
def run_until_complete(main_task=None):
183-
"""Run the given _main_task_ until it completes."""
183+
"""Run the given *main_task* until it completes."""
184184

185185
global cur_task
186186
excs_all = (CancelledError, Exception) # To prevent heap allocation in loop
@@ -283,7 +283,7 @@ def create_task(coro):
283283
return create_task(coro)
284284

285285
def run_forever():
286-
"""Run the event loop until `stop()` is called."""
286+
"""Run the event loop until `Loop.stop()` is called."""
287287

288288
global _stop_task
289289
_stop_task = Task(_stopper(), globals())

asyncio/task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ def remove(self, v):
131131
# Task class representing a coroutine, can be waited on and cancelled.
132132
class Task:
133133
"""This object wraps a coroutine into a running task. Tasks can be waited on
134-
using ``await task``, which will wait for the task to complete and reutnr the
134+
using ``await task``, which will wait for the task to complete and return the
135135
return value of the task.
136136
137-
Tasks should not be created directly, rather use `create_task` to create them.
137+
Tasks should not be created directly, rather use ``create_task`` to create them.
138138
"""
139139

140140
def __init__(self, coro, globals=None):

0 commit comments

Comments
 (0)