mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-20 05:49: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
|
- name: flake8 Lint
|
||||||
uses: py-actions/flake8@v2
|
uses: py-actions/flake8@v2
|
||||||
with:
|
with:
|
||||||
|
ignore: "BLK100"
|
||||||
exclude: "tests/*"
|
exclude: "tests/*"
|
||||||
max-line-length: "128"
|
max-line-length: "128"
|
||||||
path: "."
|
path: "."
|
||||||
|
|
|
@ -90,9 +90,9 @@ class PandoraBox:
|
||||||
""" Convert size to human readble string """
|
""" Convert size to human readble string """
|
||||||
for unit in ['B', 'KB', 'MB', 'GB', 'TB']:
|
for unit in ['B', 'KB', 'MB', 'GB', 'TB']:
|
||||||
if size < 1024.0:
|
if size < 1024.0:
|
||||||
break
|
|
||||||
size /= 1024.0
|
|
||||||
return f"{size:.{decimal_places}f}{unit}"
|
return f"{size:.{decimal_places}f}{unit}"
|
||||||
|
size /= 1024.0
|
||||||
|
return None
|
||||||
|
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
# Image Screen
|
# Image Screen
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue