Skip to content

Commit 64b8817

Browse files
committed
all: Update formatting for new Black version 22.1.0.
Signed-off-by: Damien George <damien@micropython.org>
1 parent cdd260f commit 64b8817

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

python-stdlib/email.internal/email/_encoded_words.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
# regex based decoder.
6565
_q_byte_subber = functools.partial(
66-
re.compile(br"=([a-fA-F0-9]{2})").sub, lambda m: bytes([int(m.group(1), 16)])
66+
re.compile(rb"=([a-fA-F0-9]{2})").sub, lambda m: bytes([int(m.group(1), 16)])
6767
)
6868

6969

python-stdlib/timeit/timeit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def main(args=None, *, _wrap_timer=None):
316316
if number == 0:
317317
# determine number so that 0.2 <= total time < 2.0
318318
for i in range(1, 10):
319-
number = 10 ** i
319+
number = 10**i
320320
try:
321321
x = t.timeit(number)
322322
except:

unix-ffi/datetime/datetime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def plural(n):
476476

477477
def total_seconds(self):
478478
"""Total seconds in the duration."""
479-
return ((self.days * 86400 + self.seconds) * 10 ** 6 + self.microseconds) / 10 ** 6
479+
return ((self.days * 86400 + self.seconds) * 10**6 + self.microseconds) / 10**6
480480

481481
# Read-only field accessors
482482
@property

unix-ffi/datetime/test_datetime.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ def test_overflow(self):
611611
self.assertRaises(OverflowError, lambda: -timedelta.max)
612612

613613
day = timedelta(1)
614-
self.assertRaises(OverflowError, day.__mul__, 10 ** 9)
614+
self.assertRaises(OverflowError, day.__mul__, 10**9)
615615
self.assertRaises(OverflowError, day.__mul__, 1e9)
616616
self.assertRaises(OverflowError, day.__truediv__, 1e-20)
617617
self.assertRaises(OverflowError, day.__truediv__, 1e-10)
@@ -1692,7 +1692,7 @@ def test_computations(self):
16921692
self.assertRaises(TypeError, lambda: a + a)
16931693

16941694
def test_pickling(self):
1695-
args = 6, 7, 23, 20, 59, 1, 64 ** 2
1695+
args = 6, 7, 23, 20, 59, 1, 64**2
16961696
orig = self.theclass(*args)
16971697
for pickler, unpickler, proto in pickle_choices:
16981698
green = pickler.dumps(orig, proto)
@@ -1709,7 +1709,7 @@ def test_more_pickling(self):
17091709

17101710
@unittest.skip("Skip pickling for MicroPython")
17111711
def test_pickling_subclass_datetime(self):
1712-
args = 6, 7, 23, 20, 59, 1, 64 ** 2
1712+
args = 6, 7, 23, 20, 59, 1, 64**2
17131713
orig = SubclassDatetime(*args)
17141714
for pickler, unpickler, proto in pickle_choices:
17151715
green = pickler.dumps(orig, proto)
@@ -2298,7 +2298,7 @@ def test_resolution_info(self):
22982298
self.assertTrue(self.theclass.max > self.theclass.min)
22992299

23002300
def test_pickling(self):
2301-
args = 20, 59, 16, 64 ** 2
2301+
args = 20, 59, 16, 64**2
23022302
orig = self.theclass(*args)
23032303
for pickler, unpickler, proto in pickle_choices:
23042304
green = pickler.dumps(orig, proto)
@@ -2307,7 +2307,7 @@ def test_pickling(self):
23072307

23082308
@unittest.skip("Skip pickling for MicroPython")
23092309
def test_pickling_subclass_time(self):
2310-
args = 20, 59, 16, 64 ** 2
2310+
args = 20, 59, 16, 64**2
23112311
orig = SubclassTime(*args)
23122312
for pickler, unpickler, proto in pickle_choices:
23132313
green = pickler.dumps(orig, proto)
@@ -2686,7 +2686,7 @@ def test_hash_edge_cases(self):
26862686

26872687
def test_pickling(self):
26882688
# Try one without a tzinfo.
2689-
args = 20, 59, 16, 64 ** 2
2689+
args = 20, 59, 16, 64**2
26902690
orig = self.theclass(*args)
26912691
for pickler, unpickler, proto in pickle_choices:
26922692
green = pickler.dumps(orig, proto)
@@ -2916,7 +2916,7 @@ def utcoffset(self, dt):
29162916

29172917
def test_pickling(self):
29182918
# Try one without a tzinfo.
2919-
args = 6, 7, 23, 20, 59, 1, 64 ** 2
2919+
args = 6, 7, 23, 20, 59, 1, 64**2
29202920
orig = self.theclass(*args)
29212921
for pickler, unpickler, proto in pickle_choices:
29222922
green = pickler.dumps(orig, proto)

0 commit comments

Comments
 (0)