[Pkg-bitcoin-commits] [python-quamash] 253/269: remove unnecessary QObjects & fixup super() calls

Jonas Smedegaard dr at jones.dk
Fri Nov 24 11:26:41 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 6edaa26c68ee9e15c3b57d1ddaf9b52670a008e4
Author: Mark Harviston <mark.harviston at gmail.com>
Date:   Sun Jan 18 21:08:11 2015 -0800

    remove unnecessary QObjects & fixup super() calls
---
 quamash/__init__.py | 6 +++---
 quamash/_windows.py | 5 ++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/quamash/__init__.py b/quamash/__init__.py
index 300f32b..218fa2d 100644
--- a/quamash/__init__.py
+++ b/quamash/__init__.py
@@ -104,7 +104,7 @@ class _QThreadWorker(QtCore.QThread):
 
 
 @with_logger
-class QThreadExecutor(QtCore.QObject):
+class QThreadExecutor:
 
 	"""
 	ThreadExecutor that produces QThreads.
@@ -118,8 +118,8 @@ class QThreadExecutor(QtCore.QObject):
 	...     assert r == 4
 	"""
 
-	def __init__(self, max_workers=10, parent=None):
-		super().__init__(parent)
+	def __init__(self, max_workers=10):
+		super().__init__()
 		self.__max_workers = max_workers
 		self.__queue = Queue()
 		self.__workers = [_QThreadWorker(self.__queue, i + 1) for i in range(max_workers)]
diff --git a/quamash/_windows.py b/quamash/_windows.py
index e12c85e..51c43d0 100644
--- a/quamash/_windows.py
+++ b/quamash/_windows.py
@@ -21,13 +21,12 @@ from ._common import with_logger
 UINT32_MAX = 0xffffffff
 
 
-class _ProactorEventLoop(QtCore.QObject, asyncio.ProactorEventLoop):
+class _ProactorEventLoop(asyncio.ProactorEventLoop):
 
 	"""Proactor based event loop."""
 
 	def __init__(self):
-		QtCore.QObject.__init__(self)
-		asyncio.ProactorEventLoop.__init__(self, _IocpProactor())
+		super().__init__(_IocpProactor())
 
 		self.__event_poller = _EventPoller()
 		self.__event_poller.sig_events.connect(self._process_events)

-- 
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