mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
pep8
This commit is contained in:
parent
b45e97134e
commit
fa227be4dd
@ -364,7 +364,7 @@ class CcCommentsDelegate(QStyledItemDelegate): # {{{
|
||||
if hasattr(QStyle, 'CE_ItemViewItem'):
|
||||
style.drawControl(QStyle.CE_ItemViewItem, option, painter)
|
||||
ctx = QAbstractTextDocumentLayout.PaintContext()
|
||||
ctx.palette = option.palette #.setColor(QPalette.Text, QColor("red"));
|
||||
ctx.palette = option.palette # .setColor(QPalette.Text, QColor("red"));
|
||||
if hasattr(QStyle, 'SE_ItemViewItemText'):
|
||||
textRect = style.subElementRect(QStyle.SE_ItemViewItemText, option)
|
||||
painter.save()
|
||||
@ -457,7 +457,7 @@ class CcTemplateDelegate(QStyledItemDelegate): # {{{
|
||||
validation_formatter.validate(val)
|
||||
except Exception as err:
|
||||
error_dialog(self.parent(), _('Invalid template'),
|
||||
'<p>'+_('The template %s is invalid:')%val + \
|
||||
'<p>'+_('The template %s is invalid:')%val +
|
||||
'<br>'+str(err), show=True)
|
||||
model.setData(index, QVariant(val), Qt.EditRole)
|
||||
|
||||
@ -469,3 +469,4 @@ class CcTemplateDelegate(QStyledItemDelegate): # {{{
|
||||
|
||||
# }}}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user