From b7d88ff218a3afc2000f96f30469730a514af655 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 23 May 2018 19:25:59 +0530 Subject: [PATCH] pep8 --- src/calibre/gui2/actions/choose_library.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/calibre/gui2/actions/choose_library.py b/src/calibre/gui2/actions/choose_library.py index e55680de1a..9004728187 100644 --- a/src/calibre/gui2/actions/choose_library.py +++ b/src/calibre/gui2/actions/choose_library.py @@ -187,8 +187,8 @@ class BackupStatus(QDialog): # {{{ dirty_text = '%s' % db.dirty_queue_length() except: dirty_text = _('none') - self.msg.setText('

' + - _('Book metadata files remaining to be written: %s') % dirty_text) + self.msg.setText('

' + _( + 'Book metadata files remaining to be written: %s') % dirty_text) QTimer.singleShot(1000, self.update) def mark_all_dirty(self): @@ -398,8 +398,9 @@ class ChooseLibraryAction(InterfaceAction): base = os.path.dirname(loc) old_name = name.replace('&&', '&') newname, ok = QInputDialog.getText(self.gui, _('Rename') + ' ' + old_name, - '

'+_('Choose a new name for the library %s. ')%name + - '

'+_('Note that the actual library folder will be renamed.'), + '

'+_( + 'Choose a new name for the library %s. ')%name + '

'+_( + 'Note that the actual library folder will be renamed.'), text=old_name) newname = sanitize_file_name_unicode(unicode(newname)) if not ok or not newname or newname == old_name: @@ -409,8 +410,7 @@ class ChooseLibraryAction(InterfaceAction): return error_dialog(self.gui, _('Already exists'), _('The folder %s already exists. Delete it first.') % newloc, show=True) - if (iswindows and len(newloc) > - LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT): + if (iswindows and len(newloc) > LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT): return error_dialog(self.gui, _('Too long'), _('Path to library too long. Must be less than' ' %d characters.')%LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT, @@ -470,8 +470,7 @@ class ChooseLibraryAction(InterfaceAction): LibraryDatabase = db_class() m = self.gui.library_view.model() db = m.db - if (iswindows and len(db.library_path) > - LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT): + if (iswindows and len(db.library_path) > LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT): return error_dialog(self.gui, _('Too long'), _('Path to library too long. Must be less than' ' %d characters. Move your library to a location with'