Skip to content

Commit a2b4145

Browse files
Pacify flake8
1 parent 334358e commit a2b4145

5 files changed

Lines changed: 17 additions & 7 deletions

File tree

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,16 @@ def finalize_options(self):
119119
import Cython
120120
except ImportError:
121121
raise RuntimeError(
122-
f'please install {CYTHON_DEPENDENCY} to compile uvloop from source')
122+
f'please install {CYTHON_DEPENDENCY} to compile uvloop '
123+
'from source'
124+
)
123125

124126
cython_dep = Requirement(CYTHON_DEPENDENCY)
125127
if not cython_dep.specifier.contains(Cython.__version__):
126128
raise RuntimeError(
127-
f'uvloop requires {CYTHON_DEPENDENCY}, got Cython=={Cython.__version__}')
129+
f'uvloop requires {CYTHON_DEPENDENCY}, '
130+
f'got Cython=={Cython.__version__}'
131+
)
128132

129133
from Cython.Build import cythonize
130134

tests/test_context.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ def get_buffer(self, sizehint):
6161
if self.buffered_ctx is None:
6262
self.buffered_ctx = self.cvar.get()
6363
elif self.cvar.get() != self.buffered_ctx:
64-
self.data_received_fut.set_exception(ValueError(f"{self.buffered_ctx} != {self.cvar.get()}"))
64+
self.data_received_fut.set_exception(
65+
ValueError(f"{self.buffered_ctx} != {self.cvar.get()}")
66+
)
6567
return bytearray(65536)
6668

6769
def buffer_updated(self, nbytes):

tests/test_executors.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ def run_pool_test(self, pool_factory):
1818
async def run():
1919
pool = pool_factory()
2020
with pool:
21-
coros = [self.loop.run_in_executor(pool, fib, i) for i in range(0, 10)]
21+
coros = [
22+
self.loop.run_in_executor(pool, fib, i)
23+
for i in range(0, 10)
24+
]
2225
res = await asyncio.gather(*coros)
2326
self.assertEqual(res, fib10)
2427
await asyncio.sleep(0.01)

uvloop/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ def get_event_loop(self) -> _AbstractEventLoop:
206206
"""
207207
if self._local._loop is None:
208208
raise RuntimeError(
209-
f'There is no current event loop in thread {threading.current_thread().name!r}.'
209+
'There is no current event loop in '
210+
f'thread {threading.current_thread().name!r}.'
210211
)
211212

212213
return self._local._loop

uvloop/_testbase.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def __new__(mcls, name, bases, dct):
5252
for base in bases:
5353
if hasattr(base, test_name):
5454
raise RuntimeError(
55-
f'duplicate test {name}.{test_name} (also defined in {base.__name__} '
56-
'parent class)')
55+
f'duplicate test {name}.{test_name} (also defined in '
56+
f'{base.__name__} parent class)')
5757

5858
return super().__new__(mcls, name, bases, dict(dct))
5959

0 commit comments

Comments
 (0)