Skip to content

Commit 4dbd33a

Browse files
committed
YAPF'd and flake8'd
1 parent 932be09 commit 4dbd33a

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

tests/python/test_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ def test_create_connection_sock(self):
599599
sock = socket.socket(family=family, type=type, proto=proto)
600600
sock.setblocking(False)
601601
self.loop.run_until_complete(self.loop.sock_connect(sock, address))
602-
except:
602+
except Exception:
603603
pass
604604
else:
605605
break
@@ -1369,7 +1369,7 @@ def test_create_datagram_endpoint_sock(self):
13691369
sock = socket.socket(family=family, type=type, proto=proto)
13701370
sock.setblocking(False)
13711371
sock.bind(address)
1372-
except:
1372+
except Exception:
13731373
pass
13741374
else:
13751375
break

tests/python/test_selector_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _close_self_pipe(self):
4040
pass
4141

4242

43-
def list_to_buffer(l=()):
43+
def list_to_buffer(l=()): # noqa: E741
4444
return bytearray().join(l)
4545

4646

tests/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,12 +525,12 @@ def new_test_loop(self, gen=None):
525525
return loop
526526

527527
def setUp(self):
528-
#self._get_running_loop = events._get_running_loop
529-
#events._get_running_loop = lambda: None
528+
# self._get_running_loop = events._get_running_loop
529+
# events._get_running_loop = lambda: None
530530
self._thread_cleanup = support.threading_setup()
531531

532532
def tearDown(self):
533-
#events._get_running_loop = self._get_running_loop
533+
# events._get_running_loop = self._get_running_loop
534534

535535
events.set_event_loop(None)
536536

trio_asyncio/async_.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def _main_loop_exit(self):
107107
from .loop import current_loop, current_policy, TrioPolicy
108108

109109
async with trio.open_nursery() as nursery:
110-
policy = current_policy.get()
110+
policy = current_policy.get()
111111
if not isinstance(policy, TrioPolicy):
112112
policy = TrioPolicy()
113113
old_policy = current_policy.set(policy)
@@ -128,4 +128,3 @@ def _main_loop_exit(self):
128128
nursery.cancel_scope.cancel()
129129
current_loop.reset(old_loop)
130130
current_policy.reset(old_policy)
131-

trio_asyncio/loop.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
current_loop = ContextVar('trio_aio_loop', default=None)
3535
current_policy = ContextVar('trio_aio_policy', default=None)
3636

37+
3738
class _TrioPolicy(asyncio.events.BaseDefaultEventLoopPolicy):
3839
_loop_factory = TrioEventLoop
3940

0 commit comments

Comments
 (0)