unnecessary dict index lookup (auto-fix)

ruff 'PLR1733'
This commit is contained in:
un-pogaz 2025-10-10 08:24:40 +02:00
parent 935ef37059
commit aecc99d7c1
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)