From 655ab21b0b105d042941e98dd12c3ad535767d9c Mon Sep 17 00:00:00 2001 From: Flaviu Tamas Date: Tue, 4 Sep 2018 11:05:34 -0400 Subject: [PATCH] Fix from __future__ import order --- manual/custom.py | 2 +- recipes/al_monitor.recipe | 2 +- recipes/auto_prove.recipe | 2 +- recipes/brewiarz.recipe | 2 +- recipes/dilemaveche.recipe | 2 +- recipes/houston_chronicle.recipe | 2 +- recipes/hurriyet_daily_news.recipe | 2 +- recipes/la_gazzeta_dello_sport.recipe | 2 +- recipes/lwn_weekly.recipe | 2 +- recipes/newsweek_polska.recipe | 2 +- recipes/observa_digital.recipe | 2 +- recipes/pagina_12_print_ed.recipe | 2 +- recipes/todays_zaman.recipe | 2 +- setup/upload.py | 2 +- src/calibre/constants.py | 3 +-- src/calibre/debug.py | 2 +- src/calibre/devices/kindle/bookmark.py | 2 +- src/calibre/devices/kindle/driver.py | 2 +- src/calibre/devices/udisks.py | 2 +- src/calibre/devices/usbms/cli.py | 2 +- src/calibre/devices/usbms/device.py | 2 +- src/calibre/ebooks/compression/palmdoc.py | 2 +- src/calibre/ebooks/metadata/kdl.py | 2 +- src/calibre/ebooks/metadata/opf2.py | 2 +- src/calibre/ebooks/metadata/toc.py | 2 +- src/calibre/ebooks/metadata/xisbn.py | 2 +- src/calibre/ebooks/pdf/pdftohtml.py | 2 +- src/calibre/ebooks/snb/snbfile.py | 2 +- src/calibre/gui2/actions/choose_library.py | 2 +- src/calibre/gui2/cover_flow.py | 2 +- src/calibre/gui2/dialogs/message_box.py | 2 +- src/calibre/gui2/dialogs/metadata_bulk.py | 2 +- src/calibre/gui2/library/views.py | 2 +- src/calibre/gui2/main.py | 2 +- src/calibre/gui2/preferences/plugboard.py | 2 +- src/calibre/gui2/preferences/tweaks.py | 2 +- src/calibre/gui2/viewer/main.py | 2 +- src/calibre/library/catalogs/epub_mobi_builder.py | 2 +- src/calibre/library/catalogs/utils.py | 2 +- src/calibre/library/comments.py | 2 +- src/calibre/libunzip.py | 2 +- src/calibre/utils/Zeroconf.py | 2 +- src/calibre/utils/config_base.py | 2 +- src/calibre/utils/mem.py | 2 +- src/calibre/utils/search_query_parser.py | 2 +- src/calibre/utils/sftp.py | 2 +- src/calibre/utils/socket_inheritance.py | 1 - src/calibre/web/feeds/__init__.py | 2 +- src/odf/load.py | 2 +- src/odf/odfmanifest.py | 2 +- 50 files changed, 49 insertions(+), 51 deletions(-) diff --git a/manual/custom.py b/manual/custom.py index c59ef07d81..81b54c5739 100644 --- a/manual/custom.py +++ b/manual/custom.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal ' import os, re, textwrap from functools import partial diff --git a/recipes/al_monitor.recipe b/recipes/al_monitor.recipe index a6dd54aae8..5842f5c73f 100644 --- a/recipes/al_monitor.recipe +++ b/recipes/al_monitor.recipe @@ -1,7 +1,7 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2014, spswerling' ''' http://www.al-monitor.com/ diff --git a/recipes/auto_prove.recipe b/recipes/auto_prove.recipe index 37db0e6896..5e56143aba 100644 --- a/recipes/auto_prove.recipe +++ b/recipes/auto_prove.recipe @@ -1,6 +1,6 @@ #!/usr/bin/env python2 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __author__ = 'GabrieleMarini, based on Darko Miletic' __copyright__ = '2009, Darko Miletic , Gabriele Marini' __version__ = 'v1.02 Marini Gabriele ' diff --git a/recipes/brewiarz.recipe b/recipes/brewiarz.recipe index 1abd0e5179..ae118ed8b9 100644 --- a/recipes/brewiarz.recipe +++ b/recipes/brewiarz.recipe @@ -1,7 +1,7 @@ #!/usr/bin/env python2 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' from calibre.web.feeds.news import BasicNewsRecipe import datetime diff --git a/recipes/dilemaveche.recipe b/recipes/dilemaveche.recipe index 0d96e7b1ab..400efaf2c9 100644 --- a/recipes/dilemaveche.recipe +++ b/recipes/dilemaveche.recipe @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = u'2014-01-09, Silviu Cotoar\u0103, Marius Popescu' ''' dilemaveche.ro diff --git a/recipes/houston_chronicle.recipe b/recipes/houston_chronicle.recipe index c0b5f155fb..8079974c0e 100644 --- a/recipes/houston_chronicle.recipe +++ b/recipes/houston_chronicle.recipe @@ -1,7 +1,7 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2018, Dale Furrow dkfurrow@gmail.com' ''' chron.com diff --git a/recipes/hurriyet_daily_news.recipe b/recipes/hurriyet_daily_news.recipe index ef9eec3d13..c49b35222d 100644 --- a/recipes/hurriyet_daily_news.recipe +++ b/recipes/hurriyet_daily_news.recipe @@ -1,7 +1,7 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2014, spswerling' ''' www.hurriyetdailynews.com diff --git a/recipes/la_gazzeta_dello_sport.recipe b/recipes/la_gazzeta_dello_sport.recipe index d502801adc..37831047bc 100644 --- a/recipes/la_gazzeta_dello_sport.recipe +++ b/recipes/la_gazzeta_dello_sport.recipe @@ -1,6 +1,6 @@ #!/usr/bin/env python2 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __author__ = 'Lorenzo Vigentini' __copyright__ = '2009, Lorenzo Vigentini ' __version__ = 'v1.02' diff --git a/recipes/lwn_weekly.recipe b/recipes/lwn_weekly.recipe index f16be3cf2f..d2a9f11a9b 100644 --- a/recipes/lwn_weekly.recipe +++ b/recipes/lwn_weekly.recipe @@ -1,7 +1,7 @@ #!/usr/bin/env python2 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2011, Davide Cavalca ' ''' lwn.net diff --git a/recipes/newsweek_polska.recipe b/recipes/newsweek_polska.recipe index 8f3ac647e9..a834b2150e 100644 --- a/recipes/newsweek_polska.recipe +++ b/recipes/newsweek_polska.recipe @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2010, matek09, matek09@gmail.com; 2012-2013, admroz, a.rozewicki@gmail.com' import re diff --git a/recipes/observa_digital.recipe b/recipes/observa_digital.recipe index 78dcfa40ee..1779faf922 100644 --- a/recipes/observa_digital.recipe +++ b/recipes/observa_digital.recipe @@ -1,7 +1,7 @@ #!/usr/bin/env python2 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __author__ = '2010, Gustavo Azambuja ' ''' observa.com.uy diff --git a/recipes/pagina_12_print_ed.recipe b/recipes/pagina_12_print_ed.recipe index 494be08b19..fd25d69b3a 100644 --- a/recipes/pagina_12_print_ed.recipe +++ b/recipes/pagina_12_print_ed.recipe @@ -1,7 +1,7 @@ #!/usr/bin/env python2 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal ' ''' pagina12.com.ar diff --git a/recipes/todays_zaman.recipe b/recipes/todays_zaman.recipe index e7ed5ec53d..a75c418407 100644 --- a/recipes/todays_zaman.recipe +++ b/recipes/todays_zaman.recipe @@ -1,7 +1,7 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2014, spswerling' ''' www.todayszaman.com diff --git a/setup/upload.py b/setup/upload.py index 8796d530b1..634e41c67f 100644 --- a/setup/upload.py +++ b/setup/upload.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/constants.py b/src/calibre/constants.py index db13ad52e7..3dd3ca9a08 100644 --- a/src/calibre/constants.py +++ b/src/calibre/constants.py @@ -1,9 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2015, Kovid Goyal - -from future_builtins import map from __future__ import print_function +from future_builtins import map import sys, locale, codecs, os, importlib, collections __appname__ = u'calibre' diff --git a/src/calibre/debug.py b/src/calibre/debug.py index dbf720722a..3b8c901377 100644 --- a/src/calibre/debug.py +++ b/src/calibre/debug.py @@ -1,7 +1,7 @@ #!/usr/bin/env python2 +from __future__ import print_function __license__ = 'GPL v3' -from __future__ import print_function __copyright__ = '2008, Kovid Goyal ' ''' Embedded console for debugging. diff --git a/src/calibre/devices/kindle/bookmark.py b/src/calibre/devices/kindle/bookmark.py index 2e64a14e4c..169a10654a 100644 --- a/src/calibre/devices/kindle/bookmark.py +++ b/src/calibre/devices/kindle/bookmark.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __docformat__ = 'restructuredtext en' import os diff --git a/src/calibre/devices/kindle/driver.py b/src/calibre/devices/kindle/driver.py index aba5c8d994..f55b733e66 100644 --- a/src/calibre/devices/kindle/driver.py +++ b/src/calibre/devices/kindle/driver.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2009, John Schember ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/devices/udisks.py b/src/calibre/devices/udisks.py index 7792a86521..70d7bbbfac 100644 --- a/src/calibre/devices/udisks.py +++ b/src/calibre/devices/udisks.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/devices/usbms/cli.py b/src/calibre/devices/usbms/cli.py index c577e4a387..853d55eda1 100644 --- a/src/calibre/devices/usbms/cli.py +++ b/src/calibre/devices/usbms/cli.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -__license__ = 'GPL 3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2009, John Schember ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/devices/usbms/device.py b/src/calibre/devices/usbms/device.py index 8d3085f5b5..b73138f4d2 100644 --- a/src/calibre/devices/usbms/device.py +++ b/src/calibre/devices/usbms/device.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2009, John Schember ' \ '2009, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/ebooks/compression/palmdoc.py b/src/calibre/ebooks/compression/palmdoc.py index d329a72cdf..07788c4229 100644 --- a/src/calibre/ebooks/compression/palmdoc.py +++ b/src/calibre/ebooks/compression/palmdoc.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal ' from cStringIO import StringIO diff --git a/src/calibre/ebooks/metadata/kdl.py b/src/calibre/ebooks/metadata/kdl.py index 31c08f06a0..e5b5847b35 100644 --- a/src/calibre/ebooks/metadata/kdl.py +++ b/src/calibre/ebooks/metadata/kdl.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2011, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/ebooks/metadata/opf2.py b/src/calibre/ebooks/metadata/opf2.py index 93ab56599e..4089c9a6a2 100644 --- a/src/calibre/ebooks/metadata/opf2.py +++ b/src/calibre/ebooks/metadata/opf2.py @@ -1,6 +1,6 @@ #!/usr/bin/env python2 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/ebooks/metadata/toc.py b/src/calibre/ebooks/metadata/toc.py index bf665a171e..ecdf1a8354 100644 --- a/src/calibre/ebooks/metadata/toc.py +++ b/src/calibre/ebooks/metadata/toc.py @@ -1,6 +1,6 @@ #!/usr/bin/env python2 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' import os, glob, re, functools diff --git a/src/calibre/ebooks/metadata/xisbn.py b/src/calibre/ebooks/metadata/xisbn.py index 304f965c0d..f0ecb7dd69 100644 --- a/src/calibre/ebooks/metadata/xisbn.py +++ b/src/calibre/ebooks/metadata/xisbn.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/ebooks/pdf/pdftohtml.py b/src/calibre/ebooks/pdf/pdftohtml.py index 61520181d3..1ccc4209be 100644 --- a/src/calibre/ebooks/pdf/pdftohtml.py +++ b/src/calibre/ebooks/pdf/pdftohtml.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -__license__ = 'GPL 3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal , ' \ '2009, John Schember ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/ebooks/snb/snbfile.py b/src/calibre/ebooks/snb/snbfile.py index 2b8d7a3c05..b3820955da 100644 --- a/src/calibre/ebooks/snb/snbfile.py +++ b/src/calibre/ebooks/snb/snbfile.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -__license__ = 'GPL 3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2010, Li Fanxi ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/gui2/actions/choose_library.py b/src/calibre/gui2/actions/choose_library.py index 6fe946958e..04bd081a2c 100644 --- a/src/calibre/gui2/actions/choose_library.py +++ b/src/calibre/gui2/actions/choose_library.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/gui2/cover_flow.py b/src/calibre/gui2/cover_flow.py index 926a6640ef..fcfe465780 100644 --- a/src/calibre/gui2/cover_flow.py +++ b/src/calibre/gui2/cover_flow.py @@ -1,6 +1,6 @@ #!/usr/bin/env python2 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/gui2/dialogs/message_box.py b/src/calibre/gui2/dialogs/message_box.py index bb1c5b4586..d02a063e5f 100644 --- a/src/calibre/gui2/dialogs/message_box.py +++ b/src/calibre/gui2/dialogs/message_box.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2011, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/gui2/dialogs/metadata_bulk.py b/src/calibre/gui2/dialogs/metadata_bulk.py index 729bf70ed6..a537859eee 100644 --- a/src/calibre/gui2/dialogs/metadata_bulk.py +++ b/src/calibre/gui2/dialogs/metadata_bulk.py @@ -1,9 +1,9 @@ #!/usr/bin/env python2 # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2008, Kovid Goyal +from __future__ import print_function import re -from __future__ import print_function from collections import defaultdict, namedtuple from io import BytesIO from threading import Thread diff --git a/src/calibre/gui2/library/views.py b/src/calibre/gui2/library/views.py index 3186436433..195cd905d7 100644 --- a/src/calibre/gui2/library/views.py +++ b/src/calibre/gui2/library/views.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index 903a0ca2cb..9f15f8de68 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -1,9 +1,9 @@ #!/usr/bin/env python2 # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2015, Kovid Goyal +from __future__ import print_function import os -from __future__ import print_function import re import socket import sys diff --git a/src/calibre/gui2/preferences/plugboard.py b/src/calibre/gui2/preferences/plugboard.py index 77e64a7e2c..a6beb4106d 100644 --- a/src/calibre/gui2/preferences/plugboard.py +++ b/src/calibre/gui2/preferences/plugboard.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai +from __future__ import print_function __license__ = 'GPL v3' -from __future__ import print_function __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/gui2/preferences/tweaks.py b/src/calibre/gui2/preferences/tweaks.py index 35c0a09361..d89e3171be 100644 --- a/src/calibre/gui2/preferences/tweaks.py +++ b/src/calibre/gui2/preferences/tweaks.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/gui2/viewer/main.py b/src/calibre/gui2/viewer/main.py index 44e703f7a4..2550395556 100644 --- a/src/calibre/gui2/viewer/main.py +++ b/src/calibre/gui2/viewer/main.py @@ -2,8 +2,8 @@ # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2015, Kovid Goyal -import functools from __future__ import print_function +import functools import os import sys import traceback diff --git a/src/calibre/library/catalogs/epub_mobi_builder.py b/src/calibre/library/catalogs/epub_mobi_builder.py index b1a4b85a9b..b0b42dbc60 100644 --- a/src/calibre/library/catalogs/epub_mobi_builder.py +++ b/src/calibre/library/catalogs/epub_mobi_builder.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2010, Greg Riker' import datetime, os, platform, re, shutil, time, unicodedata, zlib diff --git a/src/calibre/library/catalogs/utils.py b/src/calibre/library/catalogs/utils.py index bf36063f15..cc7e6aa6ec 100644 --- a/src/calibre/library/catalogs/utils.py +++ b/src/calibre/library/catalogs/utils.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2010, Greg Riker' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/library/comments.py b/src/calibre/library/comments.py index 45a57b76ae..d3fb0659bb 100644 --- a/src/calibre/library/comments.py +++ b/src/calibre/library/comments.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/libunzip.py b/src/calibre/libunzip.py index cc80f60516..f0d664c667 100644 --- a/src/calibre/libunzip.py +++ b/src/calibre/libunzip.py @@ -1,6 +1,6 @@ #!/usr/bin/env python2 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/utils/Zeroconf.py b/src/calibre/utils/Zeroconf.py index c03ce0f163..76bc03e189 100755 --- a/src/calibre/utils/Zeroconf.py +++ b/src/calibre/utils/Zeroconf.py @@ -19,6 +19,7 @@ Lesser General Public License for more details. """ +from __future__ import print_function """0.13 update - fix IPv6 support some cleanups in code""" @@ -74,7 +75,6 @@ added __ne__ adjuncts where required ensure names end in '.local.' timeout on receiving socket for clean shutdown""" -from __future__ import print_function __author__ = "Paul Scott-Murphy" __email__ = "paul at scott dash murphy dot com" diff --git a/src/calibre/utils/config_base.py b/src/calibre/utils/config_base.py index 112f08dd7d..c516df1610 100644 --- a/src/calibre/utils/config_base.py +++ b/src/calibre/utils/config_base.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2011, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/utils/mem.py b/src/calibre/utils/mem.py index e2a10c9c93..815f2d2e0b 100644 --- a/src/calibre/utils/mem.py +++ b/src/calibre/utils/mem.py @@ -1,8 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/utils/search_query_parser.py b/src/calibre/utils/search_query_parser.py index c42bbbaa21..77cbc43d0c 100644 --- a/src/calibre/utils/search_query_parser.py +++ b/src/calibre/utils/search_query_parser.py @@ -1,7 +1,7 @@ #!/usr/bin/env python2 # encoding: utf-8 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/utils/sftp.py b/src/calibre/utils/sftp.py index bd02c211ff..32e7094acb 100644 --- a/src/calibre/utils/sftp.py +++ b/src/calibre/utils/sftp.py @@ -1,6 +1,6 @@ #!/usr/bin/env python2 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' diff --git a/src/calibre/utils/socket_inheritance.py b/src/calibre/utils/socket_inheritance.py index 887b4da69b..4d73045feb 100644 --- a/src/calibre/utils/socket_inheritance.py +++ b/src/calibre/utils/socket_inheritance.py @@ -11,7 +11,6 @@ Created on 29 Nov 2013 Code taken from https://mail.python.org/pipermail/python-dev/2007-June/073745.html modified to make it work ''' -from __future__ import print_function from calibre.constants import iswindows diff --git a/src/calibre/web/feeds/__init__.py b/src/calibre/web/feeds/__init__.py index 29cdb185bb..fd5dfb8a91 100644 --- a/src/calibre/web/feeds/__init__.py +++ b/src/calibre/web/feeds/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python2 -__license__ = 'GPL v3' from __future__ import print_function +__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal ' ''' Contains the logic for parsing feeds. diff --git a/src/odf/load.py b/src/odf/load.py index f8077f4071..dbf6c65c77 100644 --- a/src/odf/load.py +++ b/src/odf/load.py @@ -24,8 +24,8 @@ # in memory. The user should then be able to make operations and then save # the structure again. -from xml.sax import handler from __future__ import print_function +from xml.sax import handler from element import Element from namespaces import OFFICENS diff --git a/src/odf/odfmanifest.py b/src/odf/odfmanifest.py index ada04f31f1..f0afeadc67 100644 --- a/src/odf/odfmanifest.py +++ b/src/odf/odfmanifest.py @@ -20,8 +20,8 @@ # # This script lists the content of the manifest.xml file -import zipfile from __future__ import print_function +import zipfile from xml.sax import make_parser,handler from xml.sax.xmlreader import InputSource import xml.sax.saxutils