mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
a26eba374d
commit
e1072478cb
@ -20,7 +20,6 @@ from qt.core import (
|
|||||||
QListView,
|
QListView,
|
||||||
QListWidget,
|
QListWidget,
|
||||||
Qt,
|
Qt,
|
||||||
QTabWidget,
|
|
||||||
QTableWidget,
|
QTableWidget,
|
||||||
QVBoxLayout,
|
QVBoxLayout,
|
||||||
QWidget,
|
QWidget,
|
||||||
|
@ -10,6 +10,7 @@ from qt.core import QAbstractListModel, QIcon, QItemSelectionModel, Qt
|
|||||||
|
|
||||||
from calibre.gui2.book_details import get_field_list
|
from calibre.gui2.book_details import get_field_list
|
||||||
|
|
||||||
|
|
||||||
class DisplayedFields(QAbstractListModel): # {{{
|
class DisplayedFields(QAbstractListModel): # {{{
|
||||||
|
|
||||||
def __init__(self, db, parent=None, pref_name=None, category_icons=None):
|
def __init__(self, db, parent=None, pref_name=None, category_icons=None):
|
||||||
@ -119,4 +120,4 @@ def move_field_down(widget, model):
|
|||||||
sm.select(idx, QItemSelectionModel.SelectionFlag.ClearAndSelect)
|
sm.select(idx, QItemSelectionModel.SelectionFlag.ClearAndSelect)
|
||||||
widget.setCurrentIndex(idx)
|
widget.setCurrentIndex(idx)
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
@ -9,7 +9,6 @@ __docformat__ = 'restructuredtext en'
|
|||||||
from qt.core import QKeySequence
|
from qt.core import QKeySequence
|
||||||
|
|
||||||
from calibre.gui2 import config, gprefs
|
from calibre.gui2 import config, gprefs
|
||||||
|
|
||||||
from calibre.gui2.dialogs.template_dialog import TemplateDialog
|
from calibre.gui2.dialogs.template_dialog import TemplateDialog
|
||||||
from calibre.gui2.preferences import ConfigTabWidget, ConfigWidgetBase, set_help_tips
|
from calibre.gui2.preferences import ConfigTabWidget, ConfigWidgetBase, set_help_tips
|
||||||
from calibre.gui2.preferences.look_feel_tabs.cover_view_ui import Ui_Form
|
from calibre.gui2.preferences.look_feel_tabs.cover_view_ui import Ui_Form
|
||||||
@ -63,4 +62,3 @@ class CoverView(ConfigTabWidget, Ui_Form):
|
|||||||
gui.cover_flow.setActivateOnDoubleClick(gprefs['cb_double_click_to_activate'])
|
gui.cover_flow.setActivateOnDoubleClick(gprefs['cb_double_click_to_activate'])
|
||||||
gui.update_cover_flow_subtitle_font()
|
gui.update_cover_flow_subtitle_font()
|
||||||
gui.cover_flow.template_inited = False
|
gui.cover_flow.template_inited = False
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ __license__ = 'GPL v3'
|
|||||||
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
from functools import partial
|
|
||||||
import json
|
import json
|
||||||
|
from functools import partial
|
||||||
|
|
||||||
from qt.core import QListWidgetItem, Qt
|
from qt.core import QListWidgetItem, Qt
|
||||||
|
|
||||||
@ -15,6 +15,7 @@ from calibre.gui2.preferences import ConfigTabWidget
|
|||||||
from calibre.gui2.preferences.look_feel_tabs import DisplayedFields
|
from calibre.gui2.preferences.look_feel_tabs import DisplayedFields
|
||||||
from calibre.gui2.preferences.look_feel_tabs.tb_hierarchy_ui import Ui_Form
|
from calibre.gui2.preferences.look_feel_tabs.tb_hierarchy_ui import Ui_Form
|
||||||
|
|
||||||
|
|
||||||
class TBHierarchicalFields(DisplayedFields): # {{{
|
class TBHierarchicalFields(DisplayedFields): # {{{
|
||||||
# The code in this class depends on the fact that the tag browser is
|
# The code in this class depends on the fact that the tag browser is
|
||||||
# initialized before this class is instantiated.
|
# initialized before this class is instantiated.
|
||||||
@ -170,4 +171,4 @@ class TbHierarchyTab(ConfigTabWidget, Ui_Form):
|
|||||||
|
|
||||||
def commit(self):
|
def commit(self):
|
||||||
self.tb_search_order_commit()
|
self.tb_search_order_commit()
|
||||||
self.tb_hierarchical_cats_model.commit()
|
self.tb_hierarchical_cats_model.commit()
|
||||||
|
@ -6,8 +6,8 @@ __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
|||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
from functools import partial
|
|
||||||
import os
|
import os
|
||||||
|
from functools import partial
|
||||||
|
|
||||||
from qt.core import QAbstractItemView, QApplication, QIcon, QMenu, Qt, QTableWidgetItem
|
from qt.core import QAbstractItemView, QApplication, QIcon, QMenu, Qt, QTableWidgetItem
|
||||||
|
|
||||||
@ -168,3 +168,4 @@ class TbIconRulesTab(ConfigTabWidget, Ui_Form):
|
|||||||
if len(v[category]) == 0:
|
if len(v[category]) == 0:
|
||||||
v.pop(category, None)
|
v.pop(category, None)
|
||||||
gprefs['tags_browser_value_icons'] = v
|
gprefs['tags_browser_value_icons'] = v
|
||||||
|
return rr
|
||||||
|
Loading…
x
Reference in New Issue
Block a user