update black

This commit is contained in:
Will McGugan 2022-02-14 10:03:44 +00:00
parent 4639772763
commit 5dc797e1be
3 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/psf/black
rev: 21.12b0
rev: 22.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort

View File

@ -35,7 +35,7 @@ DIVIDES = [
(0, 1000000),
(3.1427, 2),
(888, 0),
(2 ** 32, 2 ** 16),
(2**32, 2**16),
]
divide_all(DIVIDES)

View File

@ -30,7 +30,7 @@ def _to_str(
return "{:,} bytes".format(size)
for i, suffix in enumerate(suffixes, 2): # noqa: B007
unit = base ** i
unit = base**i
if size < unit:
break
return "{:,.{precision}f}{separator}{}".format(
@ -44,7 +44,7 @@ def _to_str(
def pick_unit_and_suffix(size: int, suffixes: List[str], base: int) -> Tuple[int, str]:
"""Pick a suffix and base for the given size."""
for i, suffix in enumerate(suffixes):
unit = base ** i
unit = base**i
if size < unit * base:
break
return unit, suffix