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:
parent
7d84230aaf
commit
21c954c422
2 changed files with 3 additions and 2 deletions
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
|
@ -16,6 +16,7 @@ jobs:
|
|||
- name: flake8 Lint
|
||||
uses: py-actions/flake8@v2
|
||||
with:
|
||||
ignore: "BLK100"
|
||||
exclude: "tests/*"
|
||||
max-line-length: "128"
|
||||
path: "."
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue