Skip to content

Commit 6a80f43

Browse files
committed
YAPF run
1 parent b89f5e3 commit 6a80f43

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

tests/aiotest/test_timer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def display_date(end_time, loop):
1616
if not end_time:
1717
end_time.append(loop.time() + delay * count)
1818
result.append(datetime.datetime.now())
19-
if (loop.time() + delay*1.5) < end_time[0]:
19+
if (loop.time() + delay * 1.5) < end_time[0]:
2020
loop.call_later(delay, display_date, end_time, loop)
2121
else:
2222
loop.stop(h)

tests/conftest.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,21 @@
1010
import inspect
1111

1212
# Hacks for <3.7
13-
if not hasattr(asyncio,'current_task'):
13+
if not hasattr(asyncio, 'current_task'):
14+
1415
def current_task(loop=None):
1516
return asyncio.Task.current_task(loop)
17+
1618
asyncio.current_task = current_task
1719

18-
if not hasattr(asyncio,'all_tasks'):
20+
if not hasattr(asyncio, 'all_tasks'):
21+
1922
def all_tasks(loop=None):
2023
return asyncio.Task.all_tasks(loop)
24+
2125
asyncio.all_tasks = all_tasks
2226

27+
2328
@pytest.fixture
2429
async def loop():
2530
async with trio_asyncio.open_loop() as loop:
@@ -35,9 +40,9 @@ def sync_loop():
3540
with loop:
3641
yield loop
3742

43+
3844
# auto-trio-ize all async functions
3945
@pytest.hookimpl(tryfirst=True)
4046
def pytest_pyfunc_call(pyfuncitem):
4147
if inspect.iscoroutinefunction(pyfuncitem.obj):
4248
pyfuncitem.obj = pytest.mark.trio(pyfuncitem.obj)
43-

tests/python/test_tasks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1793,7 +1793,6 @@ def foo():
17931793

17941794
@unittest.skipUnless(PY34, 'need python 3.4 or later')
17951795
def test_log_destroyed_pending_task(self):
1796-
17971796
@asyncio.coroutine
17981797
def kill_me(loop):
17991798
future = self.new_future(loop)

trio_asyncio/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class BaseTrioEventLoop(asyncio.SelectorEventLoop):
135135

136136
def __init__(self, queue_len=None):
137137
if queue_len is None:
138-
queue_len=1000
138+
queue_len = 1000
139139

140140
# Processing queue
141141
self._q = trio.Queue(queue_len)
@@ -432,7 +432,7 @@ async def synchronize(self):
432432
433433
"""
434434
w = trio.Event()
435-
self._queue_handle(Handle(w.set,(),self, is_sync=True))
435+
self._queue_handle(Handle(w.set, (), self, is_sync=True))
436436
await w.wait()
437437

438438
# Signal handling #

0 commit comments

Comments
 (0)