From 7c02419eed55b5d2a2523d1065c17325d613938e Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Mon, 3 Jun 2019 14:09:49 +0200 Subject: [PATCH] Start addressing review comments Explicit cast to float is superfluous, thanks to __future__.division --- src/calibre/devices/kobo/driver.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index 1a59f08690..e0df4123f5 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -2616,10 +2616,9 @@ class KOBOTOUCH(KOBO): # NOTE: Loosely based on Qt's QSize::scaled implementation if keep_cover_aspect: - # NOTE: Py3k wouldn't need explicit casts to return a float # NOTE: Unlike Qt, we round to avoid accumulating errors, # as ImageOps will then floor via fit_image - aspect_ratio = library_size[0] / float(library_size[1]) + aspect_ratio = library_size[0] / library_size[1] rescaled_width = int(round(kobo_size[1] * aspect_ratio)) if expand: