')
__docformat__ = 'restructuredtext en'
from qt.core import QDialog, QHBoxLayout, QIcon, QLabel, QPushButton, QSizePolicy, Qt, QVBoxLayout
diff --git a/src/calibre/gui2/store/stores/litres_plugin.py b/src/calibre/gui2/store/stores/litres_plugin.py
index 5d6858c098..c98c11b108 100644
--- a/src/calibre/gui2/store/stores/litres_plugin.py
+++ b/src/calibre/gui2/store/stores/litres_plugin.py
@@ -53,8 +53,8 @@ class LitResStore(BasicStoreConfig, StorePlugin):
d.exec()
def search(self, query, max_results=10, timeout=60):
- search_url = u'http://robot.litres.ru/pages/catalit_browser/?checkpoint=2000-01-02&'\
- 'search=%s&limit=0,%s'
+ search_url = (u'http://robot.litres.ru/pages/catalit_browser/?checkpoint=2000-01-02'
+ '&search=%s&limit=0,%s')
search_url = search_url % (quote(query), max_results)
counter = max_results
diff --git a/src/calibre/gui2/tweak_book/__init__.py b/src/calibre/gui2/tweak_book/__init__.py
index 0d681bd5f2..1b83276745 100644
--- a/src/calibre/gui2/tweak_book/__init__.py
+++ b/src/calibre/gui2/tweak_book/__init__.py
@@ -43,7 +43,17 @@ d['preview_background'] = 'auto'
d['preview_foreground'] = 'auto'
d['preview_link_color'] = 'auto'
d['remove_existing_links_when_linking_sheets'] = True
-d['charmap_favorites'] = list(map(ord, '\xa0\u2002\u2003\u2009\xad' '‘’“”‹›«»‚„' '—–§¶†‡©®™' '→⇒•·°±−×÷¼½½¾' '…µ¢£€¿¡¨´¸ˆ˜' 'ÀÁÂÃÄÅÆÇÈÉÊË' 'ÌÍÎÏÐÑÒÓÔÕÖØ' 'ŒŠÙÚÛÜÝŸÞßàá' 'âãäåæçèéêëìí' 'îïðñòóôõöøœš' 'ùúûüýÿþªºαΩ∞')) # noqa: E501
+d['charmap_favorites'] = list(map(ord, ('\xa0\u2002\u2003\u2009\xad'
+ '‘’“”‹›«»‚„'
+ '—–§¶†‡©®™'
+ '→⇒•·°±−×÷¼½½¾'
+ '…µ¢£€¿¡¨´¸ˆ˜'
+ 'ÀÁÂÃÄÅÆÇÈÉÊË'
+ 'ÌÍÎÏÐÑÒÓÔÕÖØ'
+ 'ŒŠÙÚÛÜÝŸÞßàá'
+ 'âãäåæçèéêëìí'
+ 'îïðñòóôõöøœš'
+ 'ùúûüýÿþªºαΩ∞')))
d['folders_for_types'] = {'style':'styles', 'image':'images', 'font':'fonts', 'audio':'audio', 'video':'video'}
d['pretty_print_on_open'] = False
d['disable_completion_popup_for_search'] = False
diff --git a/src/calibre/library/restore.py b/src/calibre/library/restore.py
index 6ec7855a1d..32331b9116 100644
--- a/src/calibre/library/restore.py
+++ b/src/calibre/library/restore.py
@@ -82,8 +82,8 @@ class Restore(Thread):
if self.conflicting_custom_cols:
ans += '\n\n'
- ans += 'The following custom columns have conflicting definitions ' \
- 'and were not fully restored:\n'
+ ans += ('The following custom columns have conflicting definitions '
+ 'and were not fully restored:\n')
for x in self.conflicting_custom_cols:
ans += '\t#'+x+'\n'
ans += '\tused:\t%s, %s, %s, %s\n'%(self.custom_columns[x][1],
diff --git a/src/calibre/srv/fts.py b/src/calibre/srv/fts.py
index cc4cae42fa..e467e4151f 100644
--- a/src/calibre/srv/fts.py
+++ b/src/calibre/srv/fts.py
@@ -25,7 +25,7 @@ def fts_search(ctx, rd):
ans = {'metadata': metadata_cache, 'indexing_status': {'left': l, 'total': t}}
use_stemming = rd.query.get('use_stemming', 'y') == 'y'
- query = rd.query.get('query' '')
+ query = rd.query.get('query')
if not query:
raise HTTPBadRequest('No search query specified')
qid = rd.query.get('query_id')
@@ -107,7 +107,7 @@ def fts_snippets(ctx, rd, book_ids):
raise HTTPPreconditionRequired('Full text searching is not enabled on this library')
use_stemming = rd.query.get('use_stemming', 'y') == 'y'
- query = rd.query.get('query' '')
+ query = rd.query.get('query')
if not query:
raise HTTPBadRequest('No search query specified')
try:
diff --git a/src/calibre/utils/ipython.py b/src/calibre/utils/ipython.py
index d9a6e2a40c..16f5396f32 100644
--- a/src/calibre/utils/ipython.py
+++ b/src/calibre/utils/ipython.py
@@ -159,8 +159,8 @@ class Exit:
class Helper:
def __repr__(self):
- return 'Type help() for interactive help, ' \
- 'or help(object) for help about object.'
+ return ('Type help() for interactive help, '
+ 'or help(object) for help about object.')
def __call__(self, *args, **kwds):
import pydoc
diff --git a/src/calibre/utils/localunzip.py b/src/calibre/utils/localunzip.py
index 31923806c8..95021fec53 100644
--- a/src/calibre/utils/localunzip.py
+++ b/src/calibre/utils/localunzip.py
@@ -37,8 +37,8 @@ LocalHeader = namedtuple('LocalHeader',
if hasattr(sys, 'getwindowsversion'):
windows_reserved_filenames = (
- 'CON', 'PRN', 'AUX', 'CLOCK$', 'NUL' 'COM0', 'COM1', 'COM2', 'COM3',
- 'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9' 'LPT0', 'LPT1', 'LPT2',
+ 'CON', 'PRN', 'AUX', 'CLOCK$', 'NUL', 'COM0', 'COM1', 'COM2', 'COM3',
+ 'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9', 'LPT0', 'LPT1', 'LPT2',
'LPT3', 'LPT4', 'LPT5', 'LPT6', 'LPT7', 'LPT8', 'LPT9')
def is_reserved_filename(x):
diff --git a/src/calibre/web/site_parsers/nytimes.py b/src/calibre/web/site_parsers/nytimes.py
index 172088210d..704fb71ef6 100644
--- a/src/calibre/web/site_parsers/nytimes.py
+++ b/src/calibre/web/site_parsers/nytimes.py
@@ -270,8 +270,8 @@ def extract_html(soup, url):
if '/interactive/' in url:
return (
''
- + 'This is an interactive article, which is supposed to be read in a browser.'
- + '
'
+ 'This is an interactive article, which is supposed to be read in a browser.'
+ '