mirror of https://github.com/Textualize/rich.git
update black
This commit is contained in:
parent
4639772763
commit
5dc797e1be
|
@ -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
|
||||
|
|
|
@ -35,7 +35,7 @@ DIVIDES = [
|
|||
(0, 1000000),
|
||||
(3.1427, 2),
|
||||
(888, 0),
|
||||
(2 ** 32, 2 ** 16),
|
||||
(2**32, 2**16),
|
||||
]
|
||||
|
||||
divide_all(DIVIDES)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue