py3: make sure division is really floored

This commit is contained in:
Eli Schwartz 2019-08-28 14:36:17 -04:00
parent c9f8ffedb1
commit dde0e3cd9d
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
3 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ class ConfigWidget(QWidget, Ui_ConfigWidget):
if isinstance(extra_customization_message, list):
self.opt_extra_customization = []
if len(extra_customization_message) > 6:
row_func = lambda x, y: ((x/2) * 2) + y
row_func = lambda x, y: ((x//2) * 2) + y
col_func = lambda x: x%2
else:
row_func = lambda x, y: x*2 + y

View File

@ -255,7 +255,7 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
for i in range(0, self.table.rowCount()*2):
self.start_find_pos = (self.start_find_pos + 1) % (self.table.rowCount()*2)
r = (self.start_find_pos/2)%self.table.rowCount()
r = (self.start_find_pos//2)%self.table.rowCount()
c = self.start_find_pos % 2
item = self.table.item(r, c)
text = icu_lower(unicode_type(item.text()))

View File

@ -458,7 +458,7 @@ class Quickview(QDialog, Ui_Quickview):
if self.fm[key]['display'].get('allow_half_stars', False):
vals = unicode_type(vals/2.0)
else:
vals = unicode_type(vals/2)
vals = unicode_type(vals//2)
if not isinstance(vals, list):
vals = [vals]
vals.sort(key=sort_key)