1
0
Fork 0
mirror of https://github.com/dbarzin/pandora-box.git synced 2025-07-19 21:39:40 +02:00

code quality

This commit is contained in:
dbarzin 2023-02-25 11:25:26 +01:00
parent 7d84230aaf
commit 21c954c422
2 changed files with 3 additions and 2 deletions

View file

@ -16,6 +16,7 @@ jobs:
- name: flake8 Lint
uses: py-actions/flake8@v2
with:
ignore: "BLK100"
exclude: "tests/*"
max-line-length: "128"
path: "."

View file

@ -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
size /= 1024.0
return f"{size:.{decimal_places}f}{unit}"
size /= 1024.0
return None
# -----------------------------------------------------------
# Image Screen