mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
fix trailing comma (manual)
ruff 'COM818'
This commit is contained in:
parent
5d7c9a4cf3
commit
8ba35b97b5
@ -21,7 +21,7 @@ class Grani(BasicNewsRecipe):
|
||||
|
||||
remove_tags_before = dict(name='h3')
|
||||
|
||||
remove_tags_after = dict(name='div', attrs={'class': 'main-text clearfix'}),
|
||||
remove_tags_after = dict(name='div', attrs={'class': 'main-text clearfix'})
|
||||
|
||||
# Original feeds
|
||||
# feeds = [
|
||||
|
@ -36,6 +36,6 @@ class AdvancedUserRecipe1277443634(BasicNewsRecipe):
|
||||
no_stylesheets = True
|
||||
encoding = 'utf-8'
|
||||
conversion_options = {'linearize_tables': True}
|
||||
masthead_url = 'https://cache.ltn.com.tw/images/rwd_ltnlogo.png',
|
||||
masthead_url = 'https://cache.ltn.com.tw/images/rwd_ltnlogo.png'
|
||||
cover_url = 'https://cache.ltn.com.tw/images/rwd_ltnlogo.png'
|
||||
auto_cleanup = True
|
||||
|
@ -21,7 +21,7 @@ class Zerkalo(BasicNewsRecipe):
|
||||
|
||||
remove_tags_before = dict(name='h1')
|
||||
|
||||
remove_tags_after = dict(name='div', attrs={'class': 'article_body'}),
|
||||
remove_tags_after = dict(name='div', attrs={'class': 'article_body'})
|
||||
|
||||
remove_tags = [
|
||||
dict(name='span', attrs={'class': 'print print-art-js'}),
|
||||
|
@ -21,7 +21,7 @@ class Zerkalo(BasicNewsRecipe):
|
||||
|
||||
remove_tags_before = dict(name='h1')
|
||||
|
||||
remove_tags_after = dict(name='div', attrs={'class': 'article_body'}),
|
||||
remove_tags_after = dict(name='div', attrs={'class': 'article_body'})
|
||||
|
||||
remove_tags = [
|
||||
dict(name='span', attrs={'class': 'print print-art-js'}),
|
||||
|
@ -23,7 +23,7 @@ ignore = [
|
||||
]
|
||||
select = [
|
||||
'E', 'F', 'I', 'W', 'INT',
|
||||
'Q', 'UP', 'YTT', 'TID', 'C4',
|
||||
'Q', 'UP', 'YTT', 'TID', 'C4', 'COM818',
|
||||
]
|
||||
|
||||
[lint.per-file-ignores]
|
||||
|
@ -163,7 +163,7 @@ class BuildInstaller(Command):
|
||||
class BuildInstallers(BuildInstaller):
|
||||
|
||||
OS = ''
|
||||
ALL_ARCHES = '64',
|
||||
ALL_ARCHES = ('64',)
|
||||
|
||||
def run(self, opts):
|
||||
for bitness in self.ALL_ARCHES:
|
||||
|
@ -20,7 +20,7 @@ def generate_data():
|
||||
ans = []
|
||||
for x, limit in (('day', 8), ('mon', 13)):
|
||||
for attr in ('ab' + x, x):
|
||||
ans.append((attr, tuple(map(nl, (getattr(locale, f'{attr.upper()}_{i}') for i in range(1, limit)))))),
|
||||
ans.append((attr, tuple(map(nl, (getattr(locale, f'{attr.upper()}_{i}') for i in range(1, limit))))))
|
||||
for x in ('d_t_fmt', 'd_fmt', 't_fmt', 't_fmt_ampm', 'radixchar', 'thousep', 'yesexpr', 'noexpr'):
|
||||
ans.append((x, nl(getattr(locale, x.upper()))))
|
||||
return ans
|
||||
|
@ -179,7 +179,7 @@ def main(opts, args, dbctx):
|
||||
parts = x.split(':', 1)
|
||||
book_id = int(parts[0])
|
||||
if len(parts) == 1:
|
||||
return book_id,
|
||||
return (book_id,)
|
||||
fmts = tuple(x.upper() for x in parts[1].split(','))
|
||||
return (book_id,) + fmts
|
||||
|
||||
|
@ -482,9 +482,9 @@ if ismacos:
|
||||
self.edit_menu = QMenu()
|
||||
self.edit_action = QAction(_('Edit'), self)
|
||||
self.edit_action.setMenu(self.edit_menu)
|
||||
ac(_('Copy'), QKeySequence.StandardKey.Copy),
|
||||
ac(_('Paste'), QKeySequence.StandardKey.Paste),
|
||||
ac(_('Select all'), QKeySequence.StandardKey.SelectAll),
|
||||
ac(_('Copy'), QKeySequence.StandardKey.Copy)
|
||||
ac(_('Paste'), QKeySequence.StandardKey.Paste)
|
||||
ac(_('Select all'), QKeySequence.StandardKey.SelectAll)
|
||||
mb.addAction(self.edit_action)
|
||||
self.added_actions = [self.edit_action]
|
||||
else:
|
||||
|
@ -74,7 +74,7 @@ class JobManager(QAbstractTableModel, AdaptSQP): # {{{
|
||||
job_done = pyqtSignal(int)
|
||||
|
||||
def __init__(self):
|
||||
self.header_titles = _('Job'), _('Status'), _('Progress'), _('Running time'), _('Start time'),
|
||||
self.header_titles = _('Job'), _('Status'), _('Progress'), _('Running time'), _('Start time')
|
||||
QAbstractTableModel.__init__(self)
|
||||
SearchQueryParser.__init__(self, ['all'])
|
||||
|
||||
|
@ -789,7 +789,7 @@ class User(QWidget):
|
||||
else:
|
||||
m = _('{} is currently allowed access to all libraries')
|
||||
b = _('Restrict the &libraries {} can access').format(self.username)
|
||||
self.restrict_button.setText(b),
|
||||
self.restrict_button.setText(b)
|
||||
self.access_label.setText(m.format(username))
|
||||
|
||||
def show_user(self, username=None, user_data=None):
|
||||
|
@ -558,7 +558,7 @@ class ConfigureToolBar(Dialog):
|
||||
self.available_actions.add_names(names)
|
||||
|
||||
def remove_item(self, item):
|
||||
names = self.current_actions.remove_item(item),
|
||||
names = (self.current_actions.remove_item(item),)
|
||||
self.available_actions.add_names(names)
|
||||
|
||||
def add_actions(self):
|
||||
@ -566,7 +566,7 @@ class ConfigureToolBar(Dialog):
|
||||
self.current_actions.add_names(names)
|
||||
|
||||
def add_item(self, item):
|
||||
names = self.available_actions.remove_item(item),
|
||||
names = (self.available_actions.remove_item(item),)
|
||||
self.current_actions.add_names(names)
|
||||
|
||||
def restore_defaults(self):
|
||||
|
@ -75,8 +75,8 @@ def dock_defs():
|
||||
def d(title, name, area, allowed=Qt.DockWidgetArea.LeftDockWidgetArea | Qt.DockWidgetArea.RightDockWidgetArea):
|
||||
ans[name] = Dock(name + '-dock', title, area, allowed)
|
||||
|
||||
d(_('Table of Contents'), 'toc', Qt.DockWidgetArea.LeftDockWidgetArea),
|
||||
d(_('Lookup'), 'lookup', Qt.DockWidgetArea.RightDockWidgetArea),
|
||||
d(_('Table of Contents'), 'toc', Qt.DockWidgetArea.LeftDockWidgetArea)
|
||||
d(_('Lookup'), 'lookup', Qt.DockWidgetArea.RightDockWidgetArea)
|
||||
d(_('Bookmarks'), 'bookmarks', Qt.DockWidgetArea.RightDockWidgetArea)
|
||||
d(_('Search'), 'search', Qt.DockWidgetArea.LeftDockWidgetArea)
|
||||
d(_('Inspector'), 'inspector', Qt.DockWidgetArea.RightDockWidgetArea, Qt.DockWidgetArea.AllDockWidgetAreas)
|
||||
|
@ -39,7 +39,7 @@ optparse._ = _
|
||||
|
||||
if False:
|
||||
# Make pyflakes happy
|
||||
Config, ConfigProxy, Option, OptionValues, StringConfig, OptionSet,
|
||||
Config, ConfigProxy, Option, OptionValues, StringConfig, OptionSet
|
||||
ConfigInterface, tweaks, plugin_dir, prefs, from_json, to_json, make_config_dir
|
||||
|
||||
|
||||
|
@ -114,7 +114,7 @@ class TestICU(unittest.TestCase):
|
||||
self.assertFalse(icu.contains('xxx', 'xx'))
|
||||
self.assertTrue(icu.primary_contains('pena', 'peña'))
|
||||
x = icu.primary_collator()
|
||||
self.ae(x.get_attribute(icu._icu.UCOL_STRENGTH), icu._icu.UCOL_PRIMARY),
|
||||
self.ae(x.get_attribute(icu._icu.UCOL_STRENGTH), icu._icu.UCOL_PRIMARY)
|
||||
self.ae((0, 4), icu.primary_no_punc_find('pena"', 'peña'))
|
||||
self.ae((0, 13), icu.primary_no_punc_find('typographers', 'typographer’s'))
|
||||
self.ae((0, 7), icu.primary_no_punc_find('abcd', 'a\u00adb\u200cc\u200dd'))
|
||||
|
@ -324,7 +324,7 @@ def run_test(test_name, verbosity=4, buffer=False):
|
||||
# calibre-debug -t test_name
|
||||
which_tests = None
|
||||
if test_name.startswith('@'):
|
||||
which_tests = test_name[1:],
|
||||
which_tests = test_name[1:], None
|
||||
tests = find_tests(which_tests)
|
||||
if test_name != 'all':
|
||||
if test_name.startswith('.'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user