needless else (auto-fix)

ruff 'RUF047'
This commit is contained in:
un-pogaz 2025-01-24 11:14:20 +01:00
parent 07500e1ea3
commit 5f24dfb868
5 changed files with 1 additions and 8 deletions

View File

@ -147,8 +147,6 @@ class Pocket(BasicNewsRecipe):
def cleanup(self):
if self.mark_as_read_after_dl:
self.mark_as_read([x['item_id'] for x in self.articles])
else:
pass
def default_cover(self, cover_file):
'''

View File

@ -35,6 +35,7 @@ select = [
'RUF051', 'RUF056', # useless dict operation
'RUF055', # unnecessary regex
'RUF039', # always use raw-string for regex
'RUF047', # needless else
]
[lint.per-file-ignores]

View File

@ -136,8 +136,6 @@ class DeleteInfo:
self.__write_obj.write(self.__ob)
self.__ob = 0
self.__state = 'default'
else:
pass
return True
elif self.__token_info == 'cw<ls<list______':
self.__ob = 0

View File

@ -427,8 +427,6 @@ class FieldStrings:
if match_group:
arg = match_group.group(1)
the_string += '<argument>%s' % arg
else:
pass
index = line.find('\\m')
if index > -1:
the_string += '<html2-image-map>true'

View File

@ -444,8 +444,6 @@ class RuleEditor(QDialog): # {{{
' first rule to match will be used.')))
self.l3 = l3 = QLabel(_('of the column:'))
l.addWidget(l3, 2, 2)
else:
pass
self.column_box = QComboBox(self)
l.addWidget(self.column_box, 3, 0 if self.rule_kind == 'color' else 2)