From df6521972928f45bed5bb25c664fe541361190d8 Mon Sep 17 00:00:00 2001 From: Alex Hall Date: Fri, 23 Sep 2022 16:49:57 +0200 Subject: [PATCH] (core) Remove messytables completely, particularly for excel imports Summary: Mirror of https://github.com/gristlabs/grist-core/pull/289 Test Plan: In addition to the PR, tweaked one Excel fixture file and tests involving that and one other fixture. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3640 --- sandbox/grist/imports/import_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sandbox/grist/imports/import_utils.py b/sandbox/grist/imports/import_utils.py index 40bb08c7..870ca3de 100644 --- a/sandbox/grist/imports/import_utils.py +++ b/sandbox/grist/imports/import_utils.py @@ -24,7 +24,7 @@ def column_count_modal(rows): length = len([c for c in row if not empty(c)]) if length > 1: counts[length] += 1 - if not len(counts): + if not counts: return 0 return max(list(counts.items()), key=lambda k_v: k_v[1])[0]