Commit e8590521 authored by rgaudin's avatar rgaudin
Browse files

black formatting (update)

parent f5db4eb6
......@@ -50,8 +50,8 @@ from backend.download import get_proxies, test_connection
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk, GLib, GdkPixbuf, GObject
VALID_RGBA = Gdk.RGBA(0., 0., 0., 0.)
INVALID_RGBA = Gdk.RGBA(1, 0.5, 0.5, 1.)
VALID_RGBA = Gdk.RGBA(0.0, 0.0, 0.0, 0.0)
INVALID_RGBA = Gdk.RGBA(1, 0.5, 0.5, 1.0)
mainloop = None
......@@ -112,7 +112,7 @@ class Logger(ProgressHelper):
elif current >= total:
line = "[" + "." * avail_dots + "] 100%\n"
else:
ratio = min(float(current) / total, 1.)
ratio = min(float(current) / total, 1.0)
shaded_dots = min(int(ratio * avail_dots), avail_dots)
percent = min(int(ratio * 100), 100)
line = (
......@@ -1295,7 +1295,7 @@ class Application:
end = text_buffer.get_end_iter()
end.backward_line()
self.component.run_text_view.scroll_to_iter(end, 0, True, 0, 1.)
self.component.run_text_view.scroll_to_iter(end, 0, True, 0, 1.0)
def run_window_delete_event(self, widget, path):
return True
......
......@@ -175,7 +175,7 @@ def run_installation(
sys.exit(1)
elif rf.found:
logger.std("Reusing already downloaded base image ZIP file")
logger.progress(.5)
logger.progress(0.5)
# extract base image and rename
logger.step("Extracting base image from ZIP file")
......@@ -186,7 +186,7 @@ def run_installation(
dest_fpath=image_building_path,
)
logger.std("Extraction complete: {p}".format(p=image_building_path))
logger.progress(.9)
logger.progress(0.9)
if not os.path.exists(image_building_path):
raise IOError("image path does not exists: {}".format(image_building_path))
......
......@@ -509,7 +509,7 @@ def get_adjusted_image_size(size):
if not size % ONE_GB == 0:
return size
rate = .97 if size / ONE_GB <= 16 else .96
rate = 0.97 if size / ONE_GB <= 16 else 0.96
return int(size * rate)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment