aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzonedabone2011-05-09 01:21:06 +0000
committerzonedabone2011-05-09 01:21:06 +0000
commit62f56e491b46559a8bb5e7b220babea780ccc61b (patch)
treea72e1acc70ecff76f495adfd4ab458143776e5e1
parent3b13410f6c069dd8b72db602178357588fbabb26 (diff)
Fixed imports to follow all PEP standards and removed unused imports.
-rw-r--r--nxt/bluesock.py3
-rw-r--r--nxt/brick.py7
-rw-r--r--nxt/locator.py2
-rw-r--r--nxt/motcont.py4
-rw-r--r--nxt/motor.py1
-rw-r--r--nxt/serversock.py3
6 files changed, 9 insertions, 11 deletions
diff --git a/nxt/bluesock.py b/nxt/bluesock.py
index c57894d..791c41a 100644
--- a/nxt/bluesock.py
+++ b/nxt/bluesock.py
@@ -16,8 +16,7 @@ try:
import bluetooth
except ImportError:
import lightblueglue as bluetooth
-import os
-from .brick import Brick
+from nxt.brick import Brick
class BlueSock(object):
diff --git a/nxt/brick.py b/nxt/brick.py
index 0bb2a05..8bbd43a 100644
--- a/nxt/brick.py
+++ b/nxt/brick.py
@@ -15,10 +15,9 @@
from time import sleep
from threading import Lock
-from .error import FileNotFound, ModuleNotFound
-from .telegram import OPCODES, Telegram
-from .sensor import get_sensor
-from .motcont import MotCont
+from nxt.error import FileNotFound, ModuleNotFound
+from nxt.telegram import OPCODES, Telegram
+from nxt.motcont import MotCont
def _make_poller(opcode, poll_func, parse_func):
def poll(self, *args, **kwargs):
diff --git a/nxt/locator.py b/nxt/locator.py
index c7487bd..e8fc1ed 100644
--- a/nxt/locator.py
+++ b/nxt/locator.py
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-import sys, traceback
+import traceback
class BrickNotFoundError(Exception):
pass
diff --git a/nxt/motcont.py b/nxt/motcont.py
index 8249337..f71ea6b 100644
--- a/nxt/motcont.py
+++ b/nxt/motcont.py
@@ -11,7 +11,9 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-import nxt, nxt.error, time
+import nxt
+import nxt.error
+import time
from threading import Lock
class MotorConError(nxt.error.ProtocolError):
diff --git a/nxt/motor.py b/nxt/motor.py
index f29a5a5..79f0c7d 100644
--- a/nxt/motor.py
+++ b/nxt/motor.py
@@ -16,7 +16,6 @@
"""Use for motor control"""
import time
-import warnings
PORT_A = 0x00
PORT_B = 0x01
diff --git a/nxt/serversock.py b/nxt/serversock.py
index d69bc22..ddac3c2 100644
--- a/nxt/serversock.py
+++ b/nxt/serversock.py
@@ -14,8 +14,7 @@
# GNU General Public License for more details.
import socket
-import os
-from .brick import Brick
+from nxt.brick import Brick
class ServerSock(object):