diff options
author | Fred Wright <fw@fwright.net> | 2017-07-14 15:46:45 -0700 |
---|---|---|
committer | Fred Wright <fw@fwright.net> | 2017-07-14 15:46:45 -0700 |
commit | bda3f970bd713cf553dcca47beb22682a49c7081 (patch) | |
tree | 7e86c72d197cd335455c8da85e7045dd632ba35e /xgpsspeed | |
parent | 81e3562ddf0817e513518dea866276729361d5e8 (diff) | |
download | gpsd-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 'xgpsspeed')
-rwxr-xr-x | xgpsspeed | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -11,13 +11,6 @@ # Preserve this property! from __future__ import absolute_import, print_function, division -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 -import gps from math import pi from math import cos from math import sin @@ -25,6 +18,18 @@ from math import sqrt from math import radians from socket import error as SocketError +import gps + +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 # pylint: disable=wrong-import-position +from gi.repository import Gdk # pylint: disable=wrong-import-position +from gi.repository import GObject # pylint: disable=wrong-import-position + class Speedometer(Gtk.DrawingArea): def __init__(self, speed_unit=None): |