From 743ce97c9f422281cf51727c7808e0cbc3efb3d4 Mon Sep 17 00:00:00 2001
From: Kovid Goyal
Date: Tue, 12 Jun 2018 08:02:57 +0530
Subject: [PATCH] pep8
---
src/calibre/gui2/actions/edit_metadata.py | 37 +++++++++++------------
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/src/calibre/gui2/actions/edit_metadata.py b/src/calibre/gui2/actions/edit_metadata.py
index 232bcb90fe..30609ac377 100644
--- a/src/calibre/gui2/actions/edit_metadata.py
+++ b/src/calibre/gui2/actions/edit_metadata.py
@@ -260,12 +260,12 @@ class EditMetadataAction(InterfaceAction):
from calibre.utils.icu import lower
modified = sorted(modified, key=lower)
- if not question_dialog(self.gui, _('Some books changed'), ''+
- _('The metadata for some books in your library has'
- ' changed since you started the download. If you'
- ' proceed, some of those changes may be overwritten. '
- 'Click "Show details" to see the list of changed books. '
- 'Do you want to proceed?'), det_msg='\n'.join(modified)):
+ if not question_dialog(self.gui, _('Some books changed'), '
' + _(
+ 'The metadata for some books in your library has'
+ ' changed since you started the download. If you'
+ ' proceed, some of those changes may be overwritten. '
+ 'Click "Show details" to see the list of changed books. '
+ 'Do you want to proceed?'), det_msg='\n'.join(modified)):
return
id_map = {}
@@ -496,9 +496,10 @@ class EditMetadataAction(InterfaceAction):
_('At least two books must be selected for merging'),
show=True)
if len(rows) > 5:
- if not confirm('
'+_('You are about to merge more than 5 books. '
- 'Are you sure you want to proceed?') +
- '
', 'merge_too_many_books', self.gui):
+ if not confirm(''+_(
+ 'You are about to merge more than 5 books. '
+ 'Are you sure you want to proceed?') + '
',
+ 'merge_too_many_books', self.gui):
return
dest_id, src_ids = self.books_to_merge(rows)
@@ -511,8 +512,8 @@ class EditMetadataAction(InterfaceAction):
'will be added to the first selected book (%s).
'
'The second and subsequently selected books will not '
'be deleted or changed.
'
- 'Please confirm you want to proceed.')%title +
- '
', 'merge_books_safe', self.gui, mi):
+ 'Please confirm you want to proceed.')%title + '',
+ 'merge_books_safe', self.gui, mi):
return
self.add_formats(dest_id, self.formats_for_books(rows))
self.merge_metadata(dest_id, src_ids)
@@ -527,8 +528,8 @@ class EditMetadataAction(InterfaceAction):
'All book formats of the first selected book will be kept '
'and any duplicate formats in the second and subsequently selected books '
'will be permanently deleted from your calibre library.
'
- 'Are you sure you want to proceed?')%title +
- '', 'merge_only_formats', self.gui, mi):
+ 'Are you sure you want to proceed?')%title + '',
+ 'merge_only_formats', self.gui, mi):
return
self.add_formats(dest_id, self.formats_for_books(rows))
self.delete_books_after_merge(src_ids)
@@ -541,8 +542,8 @@ class EditMetadataAction(InterfaceAction):
'All book formats of the first selected book will be kept '
'and any duplicate formats in the second and subsequently selected books '
'will be permanently deleted from your calibre library.
'
- 'Are you sure you want to proceed?')%title +
- '', 'merge_books', self.gui, mi):
+ 'Are you sure you want to proceed?')%title + '',
+ 'merge_books', self.gui, mi):
return
self.add_formats(dest_id, self.formats_for_books(rows))
self.merge_metadata(dest_id, src_ids)
@@ -613,11 +614,9 @@ class EditMetadataAction(InterfaceAction):
dest_mi.comments = src_mi.comments
else:
dest_mi.comments = unicode(dest_mi.comments) + u'\n\n' + unicode(src_mi.comments)
- if src_mi.title and (not dest_mi.title or
- dest_mi.title == _('Unknown')):
+ if src_mi.title and (not dest_mi.title or dest_mi.title == _('Unknown')):
dest_mi.title = src_mi.title
- if src_mi.title and (not dest_mi.authors or dest_mi.authors[0] ==
- _('Unknown')):
+ if src_mi.title and (not dest_mi.authors or dest_mi.authors[0] == _('Unknown')):
dest_mi.authors = src_mi.authors
dest_mi.author_sort = src_mi.author_sort
if src_mi.tags: