Skip to content

Commit 1ee7776

Browse files
committed
Trim trailing whitespace per pre-commit
1 parent 5a0f6e2 commit 1ee7776

5 files changed

Lines changed: 25 additions & 25 deletions

File tree

asyncio/core.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __next__(self):
7070
# Use a SingletonGenerator to do it without allocating on the heap
7171
def sleep_ms(t, sgen=SingletonGenerator()):
7272
"""Sleep for `t` milliseconds.
73-
73+
7474
This is a coroutine, and a MicroPython extension.
7575
"""
7676

@@ -82,7 +82,7 @@ def sleep_ms(t, sgen=SingletonGenerator()):
8282
# Pause task execution for the given time (in seconds)
8383
def sleep(t):
8484
"""Sleep for `t` seconds
85-
85+
8686
This is a coroutine.
8787
"""
8888

@@ -167,7 +167,7 @@ def _promote_to_task(aw):
167167
# Create and schedule a new task from a coroutine
168168
def create_task(coro):
169169
"""Create a new task from the given coroutine and schedule it to run.
170-
170+
171171
Returns the corresponding `Task` object.
172172
"""
173173

@@ -254,10 +254,10 @@ def run_until_complete(main_task=None):
254254
# Create a new task from a coroutine and run it until it finishes
255255
def run(coro):
256256
"""Create a new task from the given coroutine and run it until it completes.
257-
257+
258258
Returns the value returned be *coro*.
259259
"""
260-
260+
261261
return run_until_complete(create_task(coro))
262262

263263

@@ -354,7 +354,7 @@ def current_task():
354354

355355
def new_event_loop():
356356
"""Reset the event loop and return it.
357-
357+
358358
**NOTE**: Since MicroPython only has a single event loop, this function just resets
359359
the loop's state, it does not create a new one
360360
"""

asyncio/funcs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def runner(waiter, aw):
7373

7474
def wait_for_ms(aw, timeout):
7575
"""Similar to `wait_for` but *timeout* is an integer in milliseconds.
76-
76+
7777
This is a coroutine, and a MicroPython extension.
7878
"""
7979

@@ -83,9 +83,9 @@ def wait_for_ms(aw, timeout):
8383
async def gather(*aws, return_exceptions=False):
8484
"""Run all *aws* awaitables concurrently. Any *aws* that are not tasks
8585
are promoted to tasks.
86-
86+
8787
Returns a list of return values of all *aws*
88-
88+
8989
This is a coroutine.
9090
"""
9191

asyncio/lock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class Lock:
1818
"""Create a new lock which can be used to coordinate tasks. Locks start in
1919
the unlocked state.
20-
20+
2121
In addition to the methods below, locks can be used in an ``async with``
2222
statement.
2323
"""
@@ -55,7 +55,7 @@ def release(self):
5555
async def acquire(self):
5656
"""Wait for the lock to be in the unlocked state and then lock it in an
5757
atomic way. Only one task can acquire the lock at any one time.
58-
58+
5959
This is a coroutine.
6060
"""
6161

asyncio/stream.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def close(self):
4343

4444
async def wait_closed(self):
4545
"""Wait for the stream to close.
46-
46+
4747
This is a coroutine.
4848
"""
4949

@@ -52,7 +52,7 @@ async def wait_closed(self):
5252

5353
async def read(self, n):
5454
"""Read up to *n* bytes and return them.
55-
55+
5656
This is a coroutine.
5757
"""
5858

@@ -61,9 +61,9 @@ async def read(self, n):
6161

6262
async def readinto(self, buf):
6363
"""Read up to n bytes into *buf* with n being equal to the length of *buf*
64-
64+
6565
Return the number of bytes read into *buf*
66-
66+
6767
This is a coroutine, and a MicroPython extension.
6868
"""
6969

@@ -72,7 +72,7 @@ async def readinto(self, buf):
7272

7373
async def readexactly(self, n):
7474
"""Read exactly *n* bytes and return them as a bytes object.
75-
75+
7676
Raises an ``EOFError`` exception if the stream ends before reading
7777
*n* bytes.
7878
@@ -92,7 +92,7 @@ async def readexactly(self, n):
9292

9393
async def readline(self):
9494
"""Read a line and return it.
95-
95+
9696
This is a coroutine.
9797
"""
9898

@@ -114,7 +114,7 @@ def write(self, buf):
114114

115115
async def drain(self):
116116
"""Drain (write) all buffered output data out to the stream.
117-
117+
118118
This is a coroutine.
119119
"""
120120

@@ -137,10 +137,10 @@ async def drain(self):
137137
async def open_connection(host, port):
138138
"""Open a TCP connection to the given *host* and *port*. The *host* address will
139139
be resolved using `socket.getaddrinfo`, which is currently a blocking call.
140-
140+
141141
Returns a pair of streams: a reader and a writer stream. Will raise a socket-specific
142142
``OSError`` if the host could not be resolved or if the connection could not be made.
143-
143+
144144
This is a coroutine.
145145
"""
146146

@@ -182,7 +182,7 @@ def close(self):
182182

183183
async def wait_closed(self):
184184
"""Wait for the server to close.
185-
185+
186186
This is a coroutine.
187187
"""
188188

@@ -213,9 +213,9 @@ async def start_server(cb, host, port, backlog=5):
213213
"""Start a TCP server on the given *host* and *port*. The *cb* callback wil be
214214
called with incoming, accepted connections, and be passed 2 arguments: reader
215215
writer streams for the connection.
216-
216+
217217
Returns a `Server` object.
218-
218+
219219
This is a coroutine.
220220
"""
221221

asyncio/task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class Task:
133133
"""This object wraps a coroutine into a running task. Tasks can be waited on
134134
using ``await task``, which will wait for the task to complete and reutnr the
135135
return value of the task.
136-
136+
137137
Tasks should not be created directly, rather use `create_task` to create them.
138138
"""
139139

@@ -170,7 +170,7 @@ def __next__(self):
170170

171171
def done(self):
172172
"""Whether the task is complete."""
173-
173+
174174
return not self.state
175175

176176
def cancel(self):

0 commit comments

Comments
 (0)