mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-03 02:03:26 +02:00
pep8
This commit is contained in:
parent
0d033196fc
commit
34d59bc672
3 changed files with 5 additions and 4 deletions
|
|
@ -274,7 +274,7 @@ def show_context_menu(self, point):
|
|||
index = self.books_table.indexAt(point)
|
||||
item = self.books_table.item(index.row(), 0)
|
||||
if item is None:
|
||||
return False;
|
||||
return False
|
||||
book_id = int(item.data(Qt.UserRole))
|
||||
self.context_menu = QMenu(self)
|
||||
self.context_menu.addAction(self.view_icon, _('View'),
|
||||
|
|
@ -425,8 +425,7 @@ def refresh(self, idx):
|
|||
|
||||
try:
|
||||
self.current_column = (
|
||||
self.view.column_map.index('authors') if
|
||||
self.current_column is None and self.view.column_map[idx.column()] == 'title'
|
||||
self.view.column_map.index('authors') if self.current_column is None and self.view.column_map[idx.column()] == 'title'
|
||||
else idx.column())
|
||||
key = self.view.column_map[self.current_column]
|
||||
book_id = self.view.model().id(idx.row())
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ def init_action_box(self):
|
|||
if dt == 'bool':
|
||||
from calibre.gui2.ui import get_gui
|
||||
if not get_gui().current_db.prefs.get('bools_are_tristate'):
|
||||
dt = 'bool2'
|
||||
dt = 'bool2'
|
||||
if dt in self.action_map:
|
||||
actions = self.action_map[dt]
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -1602,6 +1602,7 @@ def evaluate(self, formatter, kwargs, mi, locals, val_sep):
|
|||
names = [sort_data.get(n) for n in mi.authors if n.strip()]
|
||||
return val_sep.join(n for n in names)
|
||||
|
||||
|
||||
class BuiltinCheckYesNo(BuiltinFormatterFunction):
|
||||
name = 'check_yes_no'
|
||||
arg_count = 4
|
||||
|
|
@ -1633,6 +1634,7 @@ def evaluate(self, formatter, kwargs, mi, locals, field, is_undefined, is_false,
|
|||
return 'yes'
|
||||
return ""
|
||||
|
||||
|
||||
_formatter_builtins = [
|
||||
BuiltinAdd(), BuiltinAnd(), BuiltinApproximateFormats(), BuiltinAssign(),
|
||||
BuiltinAuthorLinks(), BuiltinAuthorSorts(), BuiltinBooksize(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue