mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
pep8
This commit is contained in:
parent
a4bb2b93f0
commit
9af6fc5d62
@ -24,6 +24,7 @@ class tableItem(QTableWidgetItem):
|
|||||||
def __lt__(self, other):
|
def __lt__(self, other):
|
||||||
return sort_key(unicode_type(self.text())) < sort_key(unicode_type(other.text()))
|
return sort_key(unicode_type(self.text())) < sort_key(unicode_type(other.text()))
|
||||||
|
|
||||||
|
|
||||||
class EditColumnDelegate(QItemDelegate):
|
class EditColumnDelegate(QItemDelegate):
|
||||||
|
|
||||||
def __init__(self, completion_data):
|
def __init__(self, completion_data):
|
||||||
@ -43,6 +44,7 @@ class EditColumnDelegate(QItemDelegate):
|
|||||||
return editor
|
return editor
|
||||||
return QItemDelegate.createEditor(self, parent, option, index)
|
return QItemDelegate.createEditor(self, parent, option, index)
|
||||||
|
|
||||||
|
|
||||||
class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
|
class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
|
||||||
|
|
||||||
def __init__(self, parent, db, id_to_select, select_sort, select_link):
|
def __init__(self, parent, db, id_to_select, select_sort, select_link):
|
||||||
|
@ -502,10 +502,10 @@ class Quickview(QDialog, Ui_Quickview):
|
|||||||
|
|
||||||
for v in vals:
|
for v in vals:
|
||||||
a = QListWidgetItem(v)
|
a = QListWidgetItem(v)
|
||||||
a.setToolTip('<p>' +
|
a.setToolTip(
|
||||||
_('Click to show only books with this item. '
|
'<p>' + _(
|
||||||
'Double click to search for this item in the tag browser')
|
'Click to show only books with this item. '
|
||||||
+ '</p>')
|
'Double click to search for this item in the tag browser') + '</p>')
|
||||||
self.items.addItem(a)
|
self.items.addItem(a)
|
||||||
self.items.setCurrentRow(0)
|
self.items.setCurrentRow(0)
|
||||||
|
|
||||||
|
@ -103,6 +103,7 @@ class EditColumnDelegate(QItemDelegate):
|
|||||||
return editor
|
return editor
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
class TagListEditor(QDialog, Ui_TagListEditor):
|
class TagListEditor(QDialog, Ui_TagListEditor):
|
||||||
|
|
||||||
def __init__(self, window, cat_name, tag_to_match, get_book_ids, sorter):
|
def __init__(self, window, cat_name, tag_to_match, get_book_ids, sorter):
|
||||||
|
@ -620,7 +620,7 @@ class TagBrowserWidget(QFrame): # {{{
|
|||||||
if colon > 0:
|
if colon > 0:
|
||||||
key = self._parent.library_view.model().db.\
|
key = self._parent.library_view.model().db.\
|
||||||
field_metadata.search_term_to_field_key(txt[:colon])
|
field_metadata.search_term_to_field_key(txt[:colon])
|
||||||
if self._parent.library_view.model().db.field_metadata.has_key(key):
|
if key in self._parent.library_view.model().db.field_metadata:
|
||||||
txt = txt[colon+1:]
|
txt = txt[colon+1:]
|
||||||
else:
|
else:
|
||||||
key = None
|
key = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user