Skip to content

Commit 8d406b6

Browse files
authored
Merge pull request #1651 from zeromq/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 29aded1 + 9534ce0 commit 8d406b6

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ repos:
3939
name: isort (pyi)
4040
types: [pyi]
4141
- repo: https://github.com/psf/black
42-
rev: 21.12b0
42+
rev: 22.1.0
4343
hooks:
4444
- id: black
4545
- repo: https://github.com/pre-commit/pre-commit-hooks

examples/heartbeat/heart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# wait for connections
2828
time.sleep(1)
2929

30-
A = numpy.random.random((2 ** 11, 2 ** 11))
30+
A = numpy.random.random((2**11, 2**11))
3131
print("starting blocking loop")
3232
while True:
3333
tic = time.time()

examples/heartbeat/pong.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# wait for connections
2828
time.sleep(1)
2929

30-
A = numpy.random.random((2 ** 11, 2 ** 12))
30+
A = numpy.random.random((2**11, 2**12))
3131
print("starting blocking loop")
3232
while True:
3333
tic = time.time()

zmq/tests/test_message.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def tearDown(self):
5454
def test_above_30(self):
5555
"""Message above 30 bytes are never copied by 0MQ."""
5656
for i in range(5, 16): # 32, 64,..., 65536
57-
s = (2 ** i) * x
57+
s = (2**i) * x
5858
self.assertEqual(grc(s), 2)
5959
m = zmq.Frame(s, copy=False)
6060
self.assertEqual(grc(s), 4)
@@ -66,7 +66,7 @@ def test_above_30(self):
6666
def test_str(self):
6767
"""Test the str representations of the Frames."""
6868
for i in range(16):
69-
s = (2 ** i) * x
69+
s = (2**i) * x
7070
m = zmq.Frame(s)
7171
m_str = str(m)
7272
m_str_b = b(m_str) # py3compat
@@ -75,7 +75,7 @@ def test_str(self):
7575
def test_bytes(self):
7676
"""Test the Frame.bytes property."""
7777
for i in range(1, 16):
78-
s = (2 ** i) * x
78+
s = (2**i) * x
7979
m = zmq.Frame(s)
8080
b = m.bytes
8181
self.assertEqual(s, m.bytes)
@@ -90,22 +90,22 @@ def test_unicode(self):
9090
s = u('asdf')
9191
self.assertRaises(TypeError, zmq.Frame, s)
9292
for i in range(16):
93-
s = (2 ** i) * u('§')
93+
s = (2**i) * u('§')
9494
m = zmq.Frame(s.encode('utf8'))
9595
self.assertEqual(s, unicode(m.bytes, 'utf8'))
9696

9797
def test_len(self):
9898
"""Test the len of the Frames."""
9999
for i in range(16):
100-
s = (2 ** i) * x
100+
s = (2**i) * x
101101
m = zmq.Frame(s)
102102
self.assertEqual(len(s), len(m))
103103

104104
@skip_pypy
105105
def test_lifecycle1(self):
106106
"""Run through a ref counting cycle with a copy."""
107107
for i in range(5, 16): # 32, 64,..., 65536
108-
s = (2 ** i) * x
108+
s = (2**i) * x
109109
rc = 2
110110
self.assertEqual(grc(s), rc)
111111
m = zmq.Frame(s, copy=False)
@@ -142,7 +142,7 @@ def test_lifecycle1(self):
142142
def test_lifecycle2(self):
143143
"""Run through a different ref counting cycle with a copy."""
144144
for i in range(5, 16): # 32, 64,..., 65536
145-
s = (2 ** i) * x
145+
s = (2**i) * x
146146
rc = 2
147147
self.assertEqual(grc(s), rc)
148148
m = zmq.Frame(s, copy=False)

zmq/tests/test_socket.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def test_int_sockopts(self):
189189
self.assertEqual(p.hwm, 11)
190190
# p.setsockopt(zmq.EVENTS, zmq.POLLIN)
191191
self.assertEqual(p.getsockopt(zmq.EVENTS), zmq.POLLOUT)
192-
self.assertRaisesErrno(zmq.EINVAL, p.setsockopt, zmq.EVENTS, 2 ** 7 - 1)
192+
self.assertRaisesErrno(zmq.EINVAL, p.setsockopt, zmq.EVENTS, 2**7 - 1)
193193
self.assertEqual(p.getsockopt(zmq.TYPE), p.socket_type)
194194
self.assertEqual(p.getsockopt(zmq.TYPE), zmq.PUB)
195195
self.assertEqual(s.getsockopt(zmq.TYPE), s.socket_type)
@@ -242,7 +242,7 @@ def test_int_sockopts(self):
242242
except zmq.ZMQError as e:
243243
errors.append(f"getsockopt({opt!r}) raised {e}.")
244244
else:
245-
if n > 2 ** 31:
245+
if n > 2**31:
246246
errors.append(
247247
f"getsockopt({opt!r}) returned a ridiculous value."
248248
" It is probably the wrong type."
@@ -581,13 +581,13 @@ def test_subscribe_method(self):
581581

582582
# CI often can't handle how much memory PyPy uses on this test
583583
@mark.skipif(
584-
(pypy and on_ci) or (sys.maxsize < 2 ** 32) or (windows),
584+
(pypy and on_ci) or (sys.maxsize < 2**32) or (windows),
585585
reason="only run on 64b and not on CI.",
586586
)
587587
@mark.large
588588
def test_large_send(self):
589589
c = os.urandom(1)
590-
N = 2 ** 31 + 1
590+
N = 2**31 + 1
591591
try:
592592
buf = c * N
593593
except MemoryError as e:

zmq/utils/z85.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Z85MAP maps integers in [0,84] to the appropriate character in Z85CHARS
1919
Z85MAP = {c: idx for idx, c in enumerate(Z85CHARS)}
2020

21-
_85s = [85 ** i for i in range(5)][::-1]
21+
_85s = [85**i for i in range(5)][::-1]
2222

2323

2424
def encode(rawbytes):

0 commit comments

Comments
 (0)