From e54a07d0389890891019a33dbb8fcf975f3702da Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Mon, 7 Mar 2022 19:15:04 +1000 Subject: [PATCH] Coding style - Remove redundant casts since round function returns int in this case. --- fill3/fill3/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fill3/fill3/__init__.py b/fill3/fill3/__init__.py index 863cb44..27196b9 100755 --- a/fill3/fill3/__init__.py +++ b/fill3/fill3/__init__.py @@ -59,8 +59,8 @@ def even_widths(column_widgets, width): column_count = len(column_widgets) widths = [] for index, column_widget in enumerate(column_widgets): - start_pos = int(round(float(width) / column_count * index)) - end_pos = int(round(float(width) / column_count * (index+1))) + start_pos = round(float(width) / column_count * index) + end_pos = round(float(width) / column_count * (index+1)) widths.append(end_pos - start_pos) return widths @@ -101,8 +101,8 @@ def even_partition(row_widgets, height): row_count = len(row_widgets) heights = [] for index, row_widget in enumerate(row_widgets): - start_pos = int(round(float(height) / row_count * index)) - end_pos = int(round(float(height) / row_count * (index+1))) + start_pos = round(float(height) / row_count * index) + end_pos = round(float(height) / row_count * (index+1)) heights.append(end_pos - start_pos) return heights