[Pkg-bitcoin-commits] [python-quamash] 179/269: make pep8-naming like _windows.py
Jonas Smedegaard
dr at jones.dk
Fri Nov 24 11:26:29 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 2d11e2edbfa22118ae4a6157dd8e98af69510738
Author: Mark Harviston <mark.harviston at gmail.com>
Date: Wed Jan 7 05:04:22 2015 -0800
make pep8-naming like _windows.py
pep8-naming only allows top-level variables to be in all caps (so as to
be constants). "INFINITE" was renamed UINT32_MAX (since that's what it
is) and the usage is clarified in source where necessary.
This is a pretty minor and debateable change just to get the style
checker to shut up.
---
quamash/_windows.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/quamash/_windows.py b/quamash/_windows.py
index 523c933..e12c85e 100644
--- a/quamash/_windows.py
+++ b/quamash/_windows.py
@@ -18,6 +18,8 @@ import math
from . import QtCore
from ._common import with_logger
+UINT32_MAX = 0xffffffff
+
class _ProactorEventLoop(QtCore.QObject, asyncio.ProactorEventLoop):
@@ -72,17 +74,15 @@ class _IocpProactor(windows_events.IocpProactor):
def _poll(self, timeout=None):
"""Override in order to handle events in a threadsafe manner."""
- INFINITE = 0xffffffff
-
if timeout is None:
- ms = INFINITE
+ ms = UINT32_MAX # wait for eternity
elif timeout < 0:
raise ValueError("negative timeout")
else:
# GetQueuedCompletionStatus() has a resolution of 1 millisecond,
# round away from zero to wait *at least* timeout seconds.
ms = math.ceil(timeout * 1e3)
- if ms >= INFINITE:
+ if ms >= UINT32_MAX:
raise ValueError("timeout too big")
while True:
--
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