diff --git a/pyproject.toml b/pyproject.toml index cefa2605f6..74ef58d2f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,7 +114,7 @@ select = [ 'E', 'F', 'I', 'W', 'INT', 'Q', 'UP', 'YTT', 'TID', 'C4', 'COM818', 'PIE', 'RET501', 'ISC', 'PLE', 'PLW', 'PLC', - 'PLR0402', 'PLR1711', 'PLR1716', 'PLR1722', + 'PLR0402', 'PLR1711', 'PLR1716', 'PLR1722', 'PLR1733', 'RUF', # note: RUF can flag many unsolicited errors # preview rules 'RUF051', 'RUF056', # useless dict operation diff --git a/src/calibre/gui2/library/views.py b/src/calibre/gui2/library/views.py index c83d729224..5a1aed7a56 100644 --- a/src/calibre/gui2/library/views.py +++ b/src/calibre/gui2/library/views.py @@ -964,7 +964,7 @@ class BooksView(TableView): # {{{ sizes = state.get('column_sizes', {}) for col, size in sizes.items(): if col in cmap: - sz = sizes[col] + sz = size if sz < 3: sz = h.sectionSizeHint(cmap[col]) h.resizeSection(cmap[col], sz) diff --git a/src/calibre/gui2/pin_columns.py b/src/calibre/gui2/pin_columns.py index 471d4671bd..84fca86bd1 100644 --- a/src/calibre/gui2/pin_columns.py +++ b/src/calibre/gui2/pin_columns.py @@ -250,7 +250,7 @@ class PinTableView(TableView): sizes = state.get('column_sizes', {}) for col, size in sizes.items(): if col in cmap: - sz = sizes[col] + sz = size if sz < 3: sz = h.sectionSizeHint(cmap[col]) h.resizeSection(cmap[col], sz)