From f2bd9bc7676c6df506ff070506fa255c1aa94bb9 Mon Sep 17 00:00:00 2001 From: Hari Prasath <115340311+HarryLesnar24@users.noreply.github.com> Date: Mon, 12 Aug 2024 15:54:10 +0530 Subject: [PATCH] Fix Python Future Warning FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if not thead and not tbody: --- dataframe_image/converter/matplotlib_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataframe_image/converter/matplotlib_table.py b/dataframe_image/converter/matplotlib_table.py index ada0a9f..8829040 100644 --- a/dataframe_image/converter/matplotlib_table.py +++ b/dataframe_image/converter/matplotlib_table.py @@ -144,7 +144,7 @@ def parse_row(row): for row in tbody.findall(".//tr"): rows.append(parse_row(row)) - if not thead and not tbody: + if thead is None and tbody is None: for row in tree.findall(".//tr"): rows.append(parse_row(row))