From 5dc797e1be21106b8f883ffc40b26cc4393ca64d Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Mon, 14 Feb 2022 10:03:44 +0000 Subject: [PATCH] update black --- .pre-commit-config.yaml | 2 +- examples/exception.py | 2 +- rich/filesize.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bbae40c8..76f916b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/examples/exception.py b/examples/exception.py index b23574e1..39dbdf42 100644 --- a/examples/exception.py +++ b/examples/exception.py @@ -35,7 +35,7 @@ DIVIDES = [ (0, 1000000), (3.1427, 2), (888, 0), - (2 ** 32, 2 ** 16), + (2**32, 2**16), ] divide_all(DIVIDES) diff --git a/rich/filesize.py b/rich/filesize.py index a955bd4c..61be4751 100644 --- a/rich/filesize.py +++ b/rich/filesize.py @@ -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