From dd366cb0859d451dc4b6d43811abd0d5222ee6b7 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 11 Feb 2017 16:23:30 -0300 Subject: [PATCH] fix:__future__ imports must be the first thing in every file --- Spectrum2/backend.py | 6 +++--- Spectrum2/iochannel.py | 6 +++--- transWhat/bot.py | 6 +++--- transWhat/buddy.py | 6 +++--- transWhat/deferred.py | 6 +++--- transWhat/group.py | 6 +++--- transWhat/registersession.py | 5 +++-- transWhat/session.py | 6 +++--- transWhat/threadutils.py | 6 +++--- transWhat/transwhat.py | 6 +++--- transWhat/utils.py | 6 +++--- transWhat/whatsappbackend.py | 6 +++--- transWhat/yowsupwrapper.py | 6 +++--- 13 files changed, 39 insertions(+), 38 deletions(-) diff --git a/Spectrum2/backend.py b/Spectrum2/backend.py index 388e2ea..6174810 100644 --- a/Spectrum2/backend.py +++ b/Spectrum2/backend.py @@ -1,3 +1,6 @@ +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -21,9 +24,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals - import protocol_pb2 import socket import struct diff --git a/Spectrum2/iochannel.py b/Spectrum2/iochannel.py index a4e6010..851a197 100644 --- a/Spectrum2/iochannel.py +++ b/Spectrum2/iochannel.py @@ -1,3 +1,6 @@ +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -21,9 +24,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals - import asyncore, socket import logging import sys diff --git a/transWhat/bot.py b/transWhat/bot.py index 9a28ea0..a55b7fc 100644 --- a/transWhat/bot.py +++ b/transWhat/bot.py @@ -1,3 +1,6 @@ +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -21,9 +24,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals - import threading import inspect import re diff --git a/transWhat/buddy.py b/transWhat/buddy.py index 18ddfd0..a4eb785 100644 --- a/transWhat/buddy.py +++ b/transWhat/buddy.py @@ -1,3 +1,6 @@ +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -21,9 +24,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals - from Spectrum2 import protocol_pb2 import logging diff --git a/transWhat/deferred.py b/transWhat/deferred.py index 5fe46c2..6d075ae 100644 --- a/transWhat/deferred.py +++ b/transWhat/deferred.py @@ -1,3 +1,6 @@ +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -21,9 +24,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals - from functools import partial class Deferred(object): diff --git a/transWhat/group.py b/transWhat/group.py index beebf84..b30140d 100644 --- a/transWhat/group.py +++ b/transWhat/group.py @@ -1,3 +1,6 @@ +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -21,9 +24,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals - from Spectrum2 import protocol_pb2 class Group(): diff --git a/transWhat/registersession.py b/transWhat/registersession.py index c276d7a..82c0698 100644 --- a/transWhat/registersession.py +++ b/transWhat/registersession.py @@ -1,3 +1,6 @@ +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -21,8 +24,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals from Spectrum2 import protocol_pb2 from yowsupwrapper import YowsupApp diff --git a/transWhat/session.py b/transWhat/session.py index c76190c..761522f 100644 --- a/transWhat/session.py +++ b/transWhat/session.py @@ -1,3 +1,6 @@ +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -21,9 +24,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals - import utils import logging import urllib diff --git a/transWhat/threadutils.py b/transWhat/threadutils.py index ddb8ebe..4e07ed0 100644 --- a/transWhat/threadutils.py +++ b/transWhat/threadutils.py @@ -1,3 +1,6 @@ +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -21,9 +24,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals - import Queue import threading diff --git a/transWhat/transwhat.py b/transWhat/transwhat.py index 971f813..919f1f3 100755 --- a/transWhat/transwhat.py +++ b/transWhat/transwhat.py @@ -1,5 +1,8 @@ #!/usr/bin/python +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -23,9 +26,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals - import argparse import traceback import logging diff --git a/transWhat/utils.py b/transWhat/utils.py index c693f37..5b316fc 100644 --- a/transWhat/utils.py +++ b/transWhat/utils.py @@ -1,3 +1,6 @@ +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -21,9 +24,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals - import e4u import base64 import hashlib diff --git a/transWhat/whatsappbackend.py b/transWhat/whatsappbackend.py index 90409da..389f23a 100644 --- a/transWhat/whatsappbackend.py +++ b/transWhat/whatsappbackend.py @@ -1,3 +1,6 @@ +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -21,9 +24,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals - from Spectrum2.backend import SpectrumBackend from Spectrum2 import protocol_pb2 diff --git a/transWhat/yowsupwrapper.py b/transWhat/yowsupwrapper.py index d2e8015..11e2d69 100644 --- a/transWhat/yowsupwrapper.py +++ b/transWhat/yowsupwrapper.py @@ -1,3 +1,6 @@ +# use unicode encoding for all literals by default (for python2.x) +from __future__ import unicode_literals + __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015-2017, Steffen Vogel" __license__ = "GPLv3" @@ -21,9 +24,6 @@ __email__ = "post@steffenvogel.de" along with transWhat. If not, see . """ -# use unicode encoding for all literals by default (for python2.x) -from __future__ import unicode_literals - import logging from yowsup import env