Run mypy commit hook (#1591)

* run mypy commit hook

* fix mypy errors
old-commit-hash: 3d08dcc3b27936cb14c0eae63605be9a6c077380
This commit is contained in:
Willem Melching
2020-05-28 15:05:04 -07:00
committed by GitHub
parent 9aa70600dd
commit 2b60ee9531
39 changed files with 183 additions and 207 deletions
-22
View File
@@ -22,10 +22,7 @@ file in place without messing with <params_dir>/d.
"""
import time
import os
import string
import binascii
import errno
import sys
import shutil
import fcntl
import tempfile
@@ -401,22 +398,3 @@ def put_nonblocking(key, val):
t = threading.Thread(target=f, args=(key, val))
t.start()
return t
if __name__ == "__main__":
params = Params()
if len(sys.argv) > 2:
params.put(sys.argv[1], sys.argv[2])
else:
for k in keys:
pp = params.get(k)
if pp is None:
print("%s is None" % k)
elif all(chr(c) in string.printable for c in pp):
print("%s = %s" % (k, pp))
else:
print("%s = %s" % (k, binascii.hexlify(pp)))
# Test multiprocess:
# seq 0 100000 | xargs -P20 -I{} python common/params.py DongleId {} && sleep 0.05
# while python common/params.py DongleId; do sleep 0.05; done
+1 -1
View File
@@ -40,7 +40,7 @@ class Spinner():
self.close()
class FakeSpinner():
class FakeSpinner(Spinner):
def __init__(self):
pass
+1 -1
View File
@@ -43,7 +43,7 @@ class TextWindow():
self.close()
class FakeTextWindow():
class FakeTextWindow(TextWindow):
def __init__(self, s):
pass