all: Update formatting for new Black version 22.1.0.

Signed-off-by: Damien George <damien@micropython.org>
pull/493/head
Damien George 2022-03-22 13:30:34 +11:00
rodzic cdd260f079
commit 64b8817c0d
4 zmienionych plików z 10 dodań i 10 usunięć

Wyświetl plik

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

Wyświetl plik

@ -316,7 +316,7 @@ def main(args=None, *, _wrap_timer=None):
if number == 0:
# determine number so that 0.2 <= total time < 2.0
for i in range(1, 10):
number = 10 ** i
number = 10**i
try:
x = t.timeit(number)
except:

Wyświetl plik

@ -476,7 +476,7 @@ class timedelta:
def total_seconds(self):
"""Total seconds in the duration."""
return ((self.days * 86400 + self.seconds) * 10 ** 6 + self.microseconds) / 10 ** 6
return ((self.days * 86400 + self.seconds) * 10**6 + self.microseconds) / 10**6
# Read-only field accessors
@property

Wyświetl plik

@ -611,7 +611,7 @@ class TestTimeDelta(HarmlessMixedComparison, unittest.TestCase):
self.assertRaises(OverflowError, lambda: -timedelta.max)
day = timedelta(1)
self.assertRaises(OverflowError, day.__mul__, 10 ** 9)
self.assertRaises(OverflowError, day.__mul__, 10**9)
self.assertRaises(OverflowError, day.__mul__, 1e9)
self.assertRaises(OverflowError, day.__truediv__, 1e-20)
self.assertRaises(OverflowError, day.__truediv__, 1e-10)
@ -1692,7 +1692,7 @@ class TestDateTime(TestDate):
self.assertRaises(TypeError, lambda: a + a)
def test_pickling(self):
args = 6, 7, 23, 20, 59, 1, 64 ** 2
args = 6, 7, 23, 20, 59, 1, 64**2
orig = self.theclass(*args)
for pickler, unpickler, proto in pickle_choices:
green = pickler.dumps(orig, proto)
@ -1709,7 +1709,7 @@ class TestDateTime(TestDate):
@unittest.skip("Skip pickling for MicroPython")
def test_pickling_subclass_datetime(self):
args = 6, 7, 23, 20, 59, 1, 64 ** 2
args = 6, 7, 23, 20, 59, 1, 64**2
orig = SubclassDatetime(*args)
for pickler, unpickler, proto in pickle_choices:
green = pickler.dumps(orig, proto)
@ -2298,7 +2298,7 @@ class TestTime(HarmlessMixedComparison, unittest.TestCase):
self.assertTrue(self.theclass.max > self.theclass.min)
def test_pickling(self):
args = 20, 59, 16, 64 ** 2
args = 20, 59, 16, 64**2
orig = self.theclass(*args)
for pickler, unpickler, proto in pickle_choices:
green = pickler.dumps(orig, proto)
@ -2307,7 +2307,7 @@ class TestTime(HarmlessMixedComparison, unittest.TestCase):
@unittest.skip("Skip pickling for MicroPython")
def test_pickling_subclass_time(self):
args = 20, 59, 16, 64 ** 2
args = 20, 59, 16, 64**2
orig = SubclassTime(*args)
for pickler, unpickler, proto in pickle_choices:
green = pickler.dumps(orig, proto)
@ -2686,7 +2686,7 @@ class TestTimeTZ(TestTime, TZInfoBase, unittest.TestCase):
def test_pickling(self):
# Try one without a tzinfo.
args = 20, 59, 16, 64 ** 2
args = 20, 59, 16, 64**2
orig = self.theclass(*args)
for pickler, unpickler, proto in pickle_choices:
green = pickler.dumps(orig, proto)
@ -2916,7 +2916,7 @@ class TestDateTimeTZ(TestDateTime, TZInfoBase, unittest.TestCase):
def test_pickling(self):
# Try one without a tzinfo.
args = 6, 7, 23, 20, 59, 1, 64 ** 2
args = 6, 7, 23, 20, 59, 1, 64**2
orig = self.theclass(*args)
for pickler, unpickler, proto in pickle_choices:
green = pickler.dumps(orig, proto)