Narrow scope of various pylint inline disables (#15364)

* Narrow scope of various pylint inline disables

* Whitespace tweaks
This commit is contained in:
Ville Skyttä authored and Paulus Schoutsen committed 2018-10-10 12:17:11 +02:00
1 parent 78c38749ab
commit 707b7c202d
30 files changed
+52 -75

No files matched your search

+2 -4
View File
@@ -145,8 +145,7 @@ def run_coroutine_threadsafe(
"""Handle the call to the coroutine."""
try:
_chain_future(ensure_future(coro, loop=loop), future)
# pylint: disable=broad-except
except Exception as exc:
except Exception as exc: # pylint: disable=broad-except
if future.set_running_or_notify_cancel():
future.set_exception(exc)
else:
@@ -194,8 +193,7 @@ def run_callback_threadsafe(loop: AbstractEventLoop, callback: Callable,
"""Run callback and store result."""
try:
future.set_result(callback(*args))
# pylint: disable=broad-except
except Exception as exc:
except Exception as exc: # pylint: disable=broad-except
if future.set_running_or_notify_cancel():
future.set_exception(exc)
else: