From 21c954c4223be09e7ece45b971d8a1a65a23f4f7 Mon Sep 17 00:00:00 2001 From: dbarzin Date: Sat, 25 Feb 2023 11:25:26 +0100 Subject: [PATCH] code quality --- .github/workflows/ci.yml | 1 + pandora-box.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d381547..51dea0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: - name: flake8 Lint uses: py-actions/flake8@v2 with: + ignore: "BLK100" exclude: "tests/*" max-line-length: "128" path: "." diff --git a/pandora-box.py b/pandora-box.py index 8e19f5a..d80acbb 100755 --- a/pandora-box.py +++ b/pandora-box.py @@ -90,9 +90,9 @@ class PandoraBox: """ Convert size to human readble string """ for unit in ['B', 'KB', 'MB', 'GB', 'TB']: if size < 1024.0: - break + return f"{size:.{decimal_places}f}{unit}" size /= 1024.0 - return f"{size:.{decimal_places}f}{unit}" + return None # ----------------------------------------------------------- # Image Screen