From 7bbdba14ebae8ce9f652b341943c06992ade8836 Mon Sep 17 00:00:00 2001 From: un-pogaz <46523284+un-pogaz@users.noreply.github.com> Date: Sat, 11 Oct 2025 17:21:25 +0200 Subject: [PATCH] if expr min/max (manual) ruff 'FURB136' --- src/calibre/ebooks/lrf/html/table.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/lrf/html/table.py b/src/calibre/ebooks/lrf/html/table.py index 1d165c22e6..137f76ddc4 100644 --- a/src/calibre/ebooks/lrf/html/table.py +++ b/src/calibre/ebooks/lrf/html/table.py @@ -288,10 +288,10 @@ class Table: conv.in_table = False def number_of_columns(self): - max = 0 + val = 0 for row in self.rows: - max = row.number_of_cells() if row.number_of_cells() > max else max - return max + val = max(val, row.number_of_cells()) + return val def number_or_rows(self): return len(self.rows)