mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Simplify elif chain
This commit is contained in:
parent
afa9120940
commit
7c5184cef8
@ -140,11 +140,10 @@ class PluginWidget(QWidget,Ui_Form):
|
|||||||
# Skip disabled and incomplete rules
|
# Skip disabled and incomplete rules
|
||||||
if not rule['enabled']:
|
if not rule['enabled']:
|
||||||
continue
|
continue
|
||||||
elif not rule['field'] or not rule['pattern']:
|
if not rule['field'] or not rule['pattern']:
|
||||||
continue
|
continue
|
||||||
elif 'prefix' in rule and rule['prefix'] is None:
|
if 'prefix' in rule and rule['prefix'] is None:
|
||||||
continue
|
continue
|
||||||
else:
|
|
||||||
if rule['field'] != _('Tags'):
|
if rule['field'] != _('Tags'):
|
||||||
# Look up custom column friendly name
|
# Look up custom column friendly name
|
||||||
rule['field'] = self.eligible_custom_fields[rule['field']]['field']
|
rule['field'] = self.eligible_custom_fields[rule['field']]['field']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user