mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
needless else (auto-fix)
ruff 'RUF047'
This commit is contained in:
parent
07500e1ea3
commit
5f24dfb868
@ -147,8 +147,6 @@ class Pocket(BasicNewsRecipe):
|
|||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
if self.mark_as_read_after_dl:
|
if self.mark_as_read_after_dl:
|
||||||
self.mark_as_read([x['item_id'] for x in self.articles])
|
self.mark_as_read([x['item_id'] for x in self.articles])
|
||||||
else:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def default_cover(self, cover_file):
|
def default_cover(self, cover_file):
|
||||||
'''
|
'''
|
||||||
|
@ -35,6 +35,7 @@ select = [
|
|||||||
'RUF051', 'RUF056', # useless dict operation
|
'RUF051', 'RUF056', # useless dict operation
|
||||||
'RUF055', # unnecessary regex
|
'RUF055', # unnecessary regex
|
||||||
'RUF039', # always use raw-string for regex
|
'RUF039', # always use raw-string for regex
|
||||||
|
'RUF047', # needless else
|
||||||
]
|
]
|
||||||
|
|
||||||
[lint.per-file-ignores]
|
[lint.per-file-ignores]
|
||||||
|
@ -136,8 +136,6 @@ class DeleteInfo:
|
|||||||
self.__write_obj.write(self.__ob)
|
self.__write_obj.write(self.__ob)
|
||||||
self.__ob = 0
|
self.__ob = 0
|
||||||
self.__state = 'default'
|
self.__state = 'default'
|
||||||
else:
|
|
||||||
pass
|
|
||||||
return True
|
return True
|
||||||
elif self.__token_info == 'cw<ls<list______':
|
elif self.__token_info == 'cw<ls<list______':
|
||||||
self.__ob = 0
|
self.__ob = 0
|
||||||
|
@ -427,8 +427,6 @@ class FieldStrings:
|
|||||||
if match_group:
|
if match_group:
|
||||||
arg = match_group.group(1)
|
arg = match_group.group(1)
|
||||||
the_string += '<argument>%s' % arg
|
the_string += '<argument>%s' % arg
|
||||||
else:
|
|
||||||
pass
|
|
||||||
index = line.find('\\m')
|
index = line.find('\\m')
|
||||||
if index > -1:
|
if index > -1:
|
||||||
the_string += '<html2-image-map>true'
|
the_string += '<html2-image-map>true'
|
||||||
|
@ -444,8 +444,6 @@ class RuleEditor(QDialog): # {{{
|
|||||||
' first rule to match will be used.')))
|
' first rule to match will be used.')))
|
||||||
self.l3 = l3 = QLabel(_('of the column:'))
|
self.l3 = l3 = QLabel(_('of the column:'))
|
||||||
l.addWidget(l3, 2, 2)
|
l.addWidget(l3, 2, 2)
|
||||||
else:
|
|
||||||
pass
|
|
||||||
|
|
||||||
self.column_box = QComboBox(self)
|
self.column_box = QComboBox(self)
|
||||||
l.addWidget(self.column_box, 3, 0 if self.rule_kind == 'color' else 2)
|
l.addWidget(self.column_box, 3, 0 if self.rule_kind == 'color' else 2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user