Skip to content

Commit 9b3fde7

Browse files
committed
flake8'd
1 parent d2d88a0 commit 9b3fde7

11 files changed

Lines changed: 7 additions & 15 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
# This means, just install *everything* you see under trio/, even if it
7575
# doesn't look like a source file, so long as it appears in MANIFEST.in:
7676
include_package_data=True,
77-
python_requires=">=3.5.2", # temporary, for RTD
77+
python_requires=">=3.5.2", # temporary, for RTD
7878
keywords=["async", "io", "trio", "asyncio", "trio-asyncio"],
7979
setup_requires=['pytest-runner'],
8080
tests_require=['pytest', 'outcome'],

tests/aiotest/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import socket
2-
import sys
32
import threading
43
import time
54

tests/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import pytest
88
import asyncio
99
import trio_asyncio
10-
import trio_asyncio.loop as loop_
1110
import inspect
1211
from async_generator import async_generator, yield_
1312

tests/interop/test_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ async def test_asyncio_trio_adapted(self, loop):
119119
assert sth.flag == 2
120120

121121
@pytest.mark.trio
122-
async def test_asyncio_trio_depr(self, loop):
122+
async def test_asyncio_trio_depr2(self, loop):
123123
"""Call asyncio from trio"""
124124

125125
sth = SomeThing(loop)

tests/interop/test_calls.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ async def dly_trio(seen):
116116
assert seen.flag == 2
117117

118118
@pytest.mark.trio
119-
async def test_asyncio_trio(self, loop):
119+
async def test_asyncio_trio_depr(self, loop):
120120
"""Call asyncio from trio"""
121121

122122
async def dly_trio(seen):
@@ -133,6 +133,7 @@ async def dly_trio(seen):
133133
async def test_call_asyncio_ctx(self, loop):
134134
self.did_it = 0
135135
async with aio_as_trio(AioContext(self, loop), loop=loop) as ctx:
136+
assert ctx.parent is self
136137
assert self.did_it == 2
137138
self.did_it = 3
138139
assert self.did_it == 4
@@ -142,6 +143,7 @@ async def test_call_trio_ctx(self, loop):
142143
async def _call_trio_ctx():
143144
self.did_it = 0
144145
async with trio_as_aio(TrioContext(self)) as ctx:
146+
assert ctx.parent is self
145147
assert self.did_it == 2
146148
self.did_it = 3
147149
assert self.did_it == 4
@@ -153,6 +155,7 @@ async def test_call_trio_ctx_depr(self, loop):
153155
async def _call_trio_ctx():
154156
self.did_it = 0
155157
async with loop.wrap_trio_context(TrioContext(self)) as ctx:
158+
assert ctx.parent is self
156159
assert self.did_it == 2
157160
self.did_it = 3
158161
assert self.did_it == 4

tests/python/test_events.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import ssl
1414
except ImportError:
1515
ssl = None
16-
import subprocess
1716
import sys
1817
import threading
1918
import errno
@@ -28,7 +27,6 @@
2827
from asyncio import coroutines
2928
from asyncio import proactor_events
3029
from asyncio import selector_events
31-
from asyncio import sslproto
3230
from .. import utils as test_utils
3331
try:
3432
from test import support

tests/python/test_windows_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import sys
55
import unittest
66
import warnings
7-
from unittest import mock
87

98
if sys.platform != 'win32':
109
raise unittest.SkipTest('Windows only')

tests/test_aio_subprocess.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
"""Tests for events.py."""
22
import pytest
33

4-
import collections.abc
54
import functools
65
import os
76
import signal
87
import subprocess
98
import sys
10-
import errno
119
import unittest
1210

1311
import asyncio

tests/test_sync.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pytest
21
import asyncio
32

43

trio_asyncio/adapter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import types
55
import warnings
66

7-
from async_generator import isasyncgenfunction
87
import asyncio
98
import trio_asyncio
109
from contextvars import ContextVar
@@ -246,7 +245,7 @@ def _allow_asyncio(fn, *args):
246245
return e.value
247246
try:
248247
if isinstance(yielded, asyncio.Future):
249-
next_send = yield from trio_asyncio.run_aio_future(yielded)
248+
next_send = yield from run_aio_future(yielded)
250249
else:
251250
next_send = yield yielded
252251
except BaseException as exc:

0 commit comments

Comments
 (0)