[Pkg-bitcoin-commits] [python-quamash] 87/269: PEP8 fixes pretty much all whitespace/indentation changes of some sort: - Adding in extra whitespace - removing trailing whitespace - where Arve Knudsen used the align form of line continuations switch to the hanging indent form (the align form is not possible when using tabs)

Jonas Smedegaard dr at jones.dk
Fri Nov 24 11:26:19 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository python-quamash.

commit e01bff28ea5c647f14e434e38f3d420187706ad4
Author: Mark Harviston <mark.harviston at gmail.com>
Date:   Wed Jul 16 23:18:13 2014 -0700

    PEP8 fixes
    pretty much all whitespace/indentation changes of some sort:
    - Adding in extra whitespace
    - removing trailing whitespace
    - where Arve Knudsen used the align form of line continuations switch to the hanging indent form (the align form is not possible when using tabs)
---
 quamash/__init__.py      | 12 +++++++-----
 tests/test_qeventloop.py | 10 ++++++++--
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/quamash/__init__.py b/quamash/__init__.py
index f04f2a3..f426226 100644
--- a/quamash/__init__.py
+++ b/quamash/__init__.py
@@ -50,8 +50,10 @@ class _QThreadWorker(QtCore.QThread):
 				break
 
 			future, callback, args, kwargs = command
-			self._logger.debug('#{} got callback {} with args {} and kwargs {} from queue'
-				.format(self.__num, callback, args, kwargs))
+			self._logger.debug(
+				'#{} got callback {} with args {} and kwargs {} from queue'
+				.format(self.__num, callback, args, kwargs)
+			)
 			if future.set_running_or_notify_cancel():
 				self._logger.debug('Invoking callback')
 				r = callback(*args, **kwargs)
@@ -72,7 +74,7 @@ class QThreadExecutor(QtCore.QObject):
 	"""
 	ThreadExecutor that produces QThreads
 	Same API as `concurrent.futures.Executor`
-	
+
 	>>> from quamash import QThreadExecutor
 	>>> with QThreadExecutor(5) as executor:
 	...     f = executor.submit(lambda x: 2 + x, 2)
@@ -83,7 +85,7 @@ class QThreadExecutor(QtCore.QObject):
 		super().__init__(parent)
 		self.__max_workers = max_workers
 		self.__queue = Queue()
-		self.__workers = [_QThreadWorker(self.__queue, i+1) for i in range(max_workers)]
+		self.__workers = [_QThreadWorker(self.__queue, i + 1) for i in range(max_workers)]
 		for w in self.__workers:
 			w.start()
 
@@ -190,7 +192,7 @@ class QEventLoop(_baseclass):
 	...     yield from asyncio.sleep(.1)
 	...     assert x + y == 4
 	...     yield from asyncio.sleep(.1)
-	>>> 
+	>>>
 	>>> with QEventLoop(app) as loop:
 	...     loop.run_until_complete(xplusy(2,2))
 	"""
diff --git a/tests/test_qeventloop.py b/tests/test_qeventloop.py
index f5db5a2..3d8cd32 100644
--- a/tests/test_qeventloop.py
+++ b/tests/test_qeventloop.py
@@ -67,6 +67,7 @@ def test_can_run_tasks_in_default_executor(loop):
 
 	assert was_invoked
 
+
 def test_can_execute_subprocess(loop):
 	"""Verify that a subprocess can be executed."""
 	transport, protocol = loop.run_until_complete(loop.subprocess_exec(
@@ -75,11 +76,15 @@ def test_can_execute_subprocess(loop):
 	assert transport.get_returncode() == 0
 	assert protocol.received_stdout == 'Hello async world!'
 
+
 def test_can_terminate_subprocess(loop):
 	"""Verify that a subprocess can be terminated."""
 	# Start a never-ending process
-	transport = loop.run_until_complete(loop.subprocess_exec(
-			_SubprocessProtocol, sys.executable or 'python', '-c', 'import time\nwhile True: time.sleep(1)'))[0]
+	transport = loop.run_until_complete(
+		loop.subprocess_exec(
+			_SubprocessProtocol, sys.executable or 'python', '-c', 'import time\nwhile True: time.sleep(1)',
+		),
+	)[0]
 	# Terminate!
 	transport.kill()
 	# Wait for process to die
@@ -87,6 +92,7 @@ def test_can_terminate_subprocess(loop):
 
 	assert transport.get_returncode() != 0
 
+
 def test_can_function_as_context_manager(application):
 	"""Verify that a QEventLoop can function as its own context manager."""
 	with quamash.QEventLoop(application) as loop:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/python-quamash.git



More information about the Pkg-bitcoin-commits mailing list