From: Antonio Ospite <ao2@ao2.it>
Date: Mon, 4 Jan 2016 09:23:35 +0000 (+0100)
Subject: Put standard modules imports before other imports
X-Git-Url: https://git.ao2.it/SaveMySugar/python3-savemysugar.git/commitdiff_plain/92c5c385c06b04908bb1ea82aeb5fb81316ccaea

Put standard modules imports before other imports

This fixes wrong-import-order message from pylint.
---

diff --git a/src/measure_call_setup_time.py b/src/measure_call_setup_time.py
index 57bf49a..1a92301 100755
--- a/src/measure_call_setup_time.py
+++ b/src/measure_call_setup_time.py
@@ -17,9 +17,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import time
+
 from savemysugar.cumulative_average import cumulative_average
 from savemysugar.Modem import Modem
-import time
 
 
 class Ring(object):
diff --git a/src/measure_call_setup_time_from_android.py b/src/measure_call_setup_time_from_android.py
index 1738513..f89fce7 100755
--- a/src/measure_call_setup_time_from_android.py
+++ b/src/measure_call_setup_time_from_android.py
@@ -22,11 +22,12 @@
 # setup time" (e.g. 17) and then send a message from the Android app while
 # measuring the times with this program.
 
-from savemysugar.cumulative_average import cumulative_average
-from savemysugar.Modem import Modem
 import subprocess
 import time
 
+from savemysugar.cumulative_average import cumulative_average
+from savemysugar.Modem import Modem
+
 
 class Ring(object):
     time = -1
diff --git a/src/measure_call_setup_time_to_android.py b/src/measure_call_setup_time_to_android.py
index a862fea..b71d15c 100755
--- a/src/measure_call_setup_time_to_android.py
+++ b/src/measure_call_setup_time_to_android.py
@@ -17,11 +17,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from savemysugar.cumulative_average import cumulative_average
-from savemysugar.Modem import Modem
 import subprocess
 import time
 
+from savemysugar.cumulative_average import cumulative_average
+from savemysugar.Modem import Modem
+
 
 def measure_call_setup_time_to_android(outgoing_port, destination_number):
     outgoing_modem = Modem(outgoing_port)
diff --git a/src/measure_ring_distance.py b/src/measure_ring_distance.py
index e89b35b..66e43d3 100755
--- a/src/measure_ring_distance.py
+++ b/src/measure_ring_distance.py
@@ -17,9 +17,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import time
+
 from savemysugar.cumulative_average import cumulative_average
 from savemysugar.Modem import Modem
-import time
 
 
 class Rings(object):
diff --git a/src/receive.py b/src/receive.py
index 1d4fda1..8c2c102 100755
--- a/src/receive.py
+++ b/src/receive.py
@@ -17,9 +17,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import logging
+
 from savemysugar.CallDistanceTransceiver import CallDistanceTransceiver
 from savemysugar.Modem import Modem
-import logging
 
 # TODO: set the logging level from the command line
 FORMAT = "%(created)f %(levelname)s:%(funcName)s %(message)s"
diff --git a/src/savemysugar/CallDistanceTransceiver.py b/src/savemysugar/CallDistanceTransceiver.py
index 15fcdae..14914b1 100755
--- a/src/savemysugar/CallDistanceTransceiver.py
+++ b/src/savemysugar/CallDistanceTransceiver.py
@@ -17,6 +17,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import logging
+import time
 
 # This hack allows importing local modules also when
 # __name__ == "__main__"
@@ -27,9 +29,6 @@ except SystemError:
     from MorseDistanceModulator import MorseDistanceModulator
     from MorseTranslator import MorseTranslator
 
-import logging
-import time
-
 
 def log_symbol(distance, symbol, extra_info=""):
     logging.info("distance: %.2f Received \"%s\"%s", distance, symbol,
diff --git a/src/transmit.py b/src/transmit.py
index 2e8ef4c..4910066 100755
--- a/src/transmit.py
+++ b/src/transmit.py
@@ -17,9 +17,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import logging
+
 from savemysugar.CallDistanceTransceiver import CallDistanceTransceiver
 from savemysugar.Modem import Modem
-import logging
 
 # TODO: set the logging level from the command line
 FORMAT = "%(created)f %(levelname)s:%(funcName)s %(message)s"