8000 Normalize whitespace (use "make pep8" to verify). · python/asyncio@f2d2f7e · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Commit f2d2f7e

Browse files
committed
Normalize whitespace (use "make pep8" to verify).
1 parent ee66957 commit f2d2f7e

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

asyncio/streams.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
_DEFAULT_LIMIT = 2**16
1616

17+
1718
class IncompleteReadError(EOFError):
1819
"""
1920
Incomplete read error. Attributes:

tests/test_streams.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,15 +415,15 @@ def client():
415415
server = MyServer(self.loop)
416416
server.start()
417417
msg = self.loop.run_until_complete(asyncio.Task(client(),
418-
loop=self.loop))
418+
loop=self.loop))
419419
server.stop()
420420
self.assertEqual(msg, b"hello world!\n")
421421

422422
# test the server variant with a callback as client handler
423423
server = MyServer(self.loop)
424424
server.start_callback()
425425
msg = self.loop.run_until_complete(asyncio.Task(client(),
426-
loop=self.loop))
426+
loop=self.loop))
427427
server.stop()
428428
self.assertEqual(msg, b"hello world!\n")
429429

tests/test_tasks.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ def foo():
379379
self.assertAlmostEqual(0.1, loop.time())
380380
self.assertEqual(foo_running, False)
381381

382-
383382
def test_wait_for_blocking(self):
384383
loop = test_utils.TestLoop()
385384
self.addCleanup(loop.close)
@@ -388,7 +387,9 @@ def test_wait_for_blocking(self):
388387
def coro():
389388
return 'done'
390389

391-
res = loop.run_until_complete(asyncio.wait_for(coro(), timeout=None, loop=loop))
390+
res = loop.run_until_complete(asyncio.wait_for(coro(),
391+
timeout=None,
392+
loop=loop))
392393
self.assertEqual(res, 'done')
393394

394395
def test_wait_for_with_global_loop(self):
@@ -490,7 +491,7 @@ def test_wait_errors(self):
490491
self.assertRaises(
491492
ValueError, self.loop.run_until_complete,
492493
asyncio.wait([asyncio.sleep(10.0, loop=self.loop)],
493-
return_when=-1, loop=self.loop))
494+
return_when=-1, loop=self.loop))
494495

495496
def test_wait_first_completed(self):
496497

@@ -508,7 +509,7 @@ def gen():
508509
b = asyncio.Task(asyncio.sleep(0.1, loop=loop), loop=loop)
509510
task = asyncio.Task(
510511
asyncio.wait([b, a], return_when=asyncio.FIRST_COMPLETED,
511-
loop=loop),
512+
loop=loop),
512513
loop=loop)
513514

514515
done, pending = loop.run_until_complete(task)
@@ -540,7 +541,7 @@ def coro2():
540541
b = asyncio.Task(coro2(), loop=self.loop)
541542
task = asyncio.Task(
542543
asyncio.wait([b, a], return_when=asyncio.FIRST_COMPLETED,
543-
loop=self.loop),
544+
loop=self.loop),
544545
loop=self.loop)
545546

546547
done, pending = self.loop.run_until_complete(task)
@@ -570,7 +571,7 @@ def exc():
570571
b = asyncio.Task(exc(), loop=loop)
571572
task = asyncio.Task(
572573
asyncio.wait([b, a], return_when=asyncio.FIRST_EXCEPTION,
573-
loop=loop),
574+
loop=loop),
574575
loop=loop)
575576

576577
done, pending = loop.run_until_complete(task)
@@ -604,7 +605,7 @@ def exc():
604605

605606
b = asyncio.Task(exc(), loop=loop)
606607
task = asyncio.wait([b, a], return_when=asyncio.FIRST_EXCEPTION,
607-
loop=loop)
608+
loop=loop)
608609

609610
done, pending = loop.run_until_complete(task)
610611
self.assertEqual({b}, done)
@@ -670,7 +671,7 @@ def gen():
670671
@asyncio.coroutine
671672
def foo():
672673
done, pending = yield from asyncio.wait([b, a], timeout=0.11,
673-
loop=loop)
674+
loop=loop)
674675
self.assertEqual(done, set([a]))
675676
self.assertEqual(pending, set([b]))
676677

@@ -874,7 +875,7 @@ def gen():
874875
self.addCleanup(loop.close)
875876

876877
t = asyncio.Task(asyncio.sleep(10.0, 'yeah', loop=loop),
877-
loop=loop)
878+
loop=loop)
878879

879880
handle = None
880881
orig_call_later = loop.call_later
@@ -1156,7 +1157,7 @@ def coro2(loop):
11561157
task2 = asyncio.Task(coro2(self.loop), loop=self.loop)
11571158

11581159
self.loop.run_until_complete(asyncio.wait((task1, task2),
1159-
loop=self.loop))
1160+
l 81D6 oop=self.loop))
11601161
self.assertIsNone(asyncio.Task.current_task(loop=self.loop))
11611162

11621163
# Some thorough tests for cancellation propagation through
@@ -1367,7 +1368,7 @@ def test_one_exception(self):
13671368
def test_return_exceptions(self):
13681369
a, b, c, d = [asyncio.Future(loop=self.one_loop) for i in range(4)]
13691370
fut = asyncio.gather(*self.wrap_futures(a, b, c, d),
1370-
return_exceptions=True)
1371+
return_exceptions=True)
13711372
cb = Mock()
13721373
fut.add_done_callback(cb)
13731374
exc = ZeroDivisionError()

0 commit comments

Comments
 (0)
0