summaryrefslogtreecommitdiff
path: root/xgps
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2017-07-14 15:46:45 -0700
committerFred Wright <fw@fwright.net>2017-07-14 15:46:45 -0700
commitbda3f970bd713cf553dcca47beb22682a49c7081 (patch)
tree7e86c72d197cd335455c8da85e7045dd632ba35e /xgps
parent81e3562ddf0817e513518dea866276729361d5e8 (diff)
downloadgpsd-bda3f970bd713cf553dcca47beb22682a49c7081.tar.gz
Fixes some pylint issues.
This doesn't fix all complaints by pylint, but significantly reduces their number. Ditto for pep8 complaints. Also makes a couple of related cosmetic edits. TESTED: Ran "scons build-all check" with no errors. Both "pylint" and "pep8" targets report fewer issues.
Diffstat (limited to 'xgps')
-rwxr-xr-xxgps33
1 files changed, 18 insertions, 15 deletions
diff --git a/xgps b/xgps
index 784cb680..776fa6a4 100755
--- a/xgps
+++ b/xgps
@@ -7,33 +7,36 @@ usage: xgps [-D level] [-hV?] [-l degmfmt] [-u units] [-r rotation]
[server[:port[:device]]]
'''
+# This file is Copyright (c) 2010 by the GPSD project
+# BSD terms apply: see the file COPYING in the distribution root for details.
+#
# This code runs compatibly under Python 2 and 3.x for x >= 2.
# Preserve this property!
from __future__ import absolute_import, print_function, division
-gui_about = '''\
-This is xgps, a test client for the gpsd daemon.
-
-By Eric S. Raymond for the GPSD project, December 2009
-'''
-#
-# This file is Copyright (c) 2010 by the GPSD project
-# BSD terms apply: see the file COPYING in the distribution root for details.
-
import math
import socket
import sys
import time
-from gi.repository import GObject
+import gps
+import gps.clienthelpers
+
+import cairo
+
+# Gtk3 imports. Gtk3 requires the require_version(), which then causes
+# pylint to complain about the subsequent "non-top" imports.
import gi
gi.require_version('Gtk', '3.0')
-from gi.repository import Gtk
-from gi.repository import Gdk
-import cairo
+from gi.repository import GObject # pylint: disable=wrong-import-position
+from gi.repository import Gtk # pylint: disable=wrong-import-position
+from gi.repository import Gdk # pylint: disable=wrong-import-position
-import gps
-import gps.clienthelpers
+gui_about = '''\
+This is xgps, a test client for the gpsd daemon.
+
+By Eric S. Raymond for the GPSD project, December 2009
+'''
# Use our own MAXCHANNELS value, due to the tradeoff between max sats and
# the window size. Ideally, this should be dynamic.