Skip to content

Commit 8fc45da

Browse files
Pacify flake8
1 parent 9bcc1fa commit 8fc45da

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

setup.py

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

123125
cython_dep = pkg_resources.Requirement.parse(CYTHON_DEPENDENCY)
124126
if Cython.__version__ not in cython_dep:
125127
raise RuntimeError(
126-
f'uvloop requires {CYTHON_DEPENDENCY}, got Cython=={Cython.__version__}')
128+
f'uvloop requires {CYTHON_DEPENDENCY}, '
129+
f'got Cython=={Cython.__version__}'
130+
)
127131

128132
from Cython.Build import cythonize
129133

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)