From ba55e4d9bd0bbf17db756a3e930c31d0d694f530 Mon Sep 17 00:00:00 2001 From: Daniel Pavel Date: Fri, 5 Jul 2013 16:19:49 +0200 Subject: [PATCH] import * cleanups --- lib/hidapi/__init__.py | 13 ++++++++++++- lib/logitech/unifying_receiver/settings.py | 3 --- lib/solaar/ui/notify.py | 8 +++++--- lib/solaar/ui/window.py | 2 +- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/lib/hidapi/__init__.py b/lib/hidapi/__init__.py index b8bcdbc3..bf37a1e1 100644 --- a/lib/hidapi/__init__.py +++ b/lib/hidapi/__init__.py @@ -4,4 +4,15 @@ from __future__ import absolute_import, division, print_function, unicode_litera __version__ = "0.6" -from hidapi.udev import * +from hidapi.udev import ( + enumerate, + open, + close, + open_path, + monitor_glib, + read, + write, + get_manufacturer, + get_product, + get_serial, + ) diff --git a/lib/logitech/unifying_receiver/settings.py b/lib/logitech/unifying_receiver/settings.py index 431171b6..49d71bed 100644 --- a/lib/logitech/unifying_receiver/settings.py +++ b/lib/logitech/unifying_receiver/settings.py @@ -235,6 +235,3 @@ class ChoicesValidator(object): # just assume the value was written correctly, otherwise there would not # be any reply_bytes to check return self.choices[value] - - -__all__ = ('KIND', 'Setting', 'RegisterRW', 'FeatureRW', 'BooleanValidator', 'ChoicesValidator') diff --git a/lib/solaar/ui/notify.py b/lib/solaar/ui/notify.py index 41fdae59..2801caf2 100644 --- a/lib/solaar/ui/notify.py +++ b/lib/solaar/ui/notify.py @@ -9,7 +9,7 @@ try: # this import is allowed to fail, in which case the entire feature is unavailable from gi.repository import Notify - from logging import getLogger, DEBUG as _DEBUG + from logging import getLogger, INFO as _INFO _log = getLogger(__name__) del getLogger @@ -28,7 +28,8 @@ try: global available if available: if not Notify.is_initted(): - _log.info("starting desktop notifications") + if _log.isEnabledFor(_INFO): + _log.info("starting desktop notifications") try: return Notify.init(NAME) except: @@ -39,7 +40,8 @@ try: def uninit(): if available and Notify.is_initted(): - _log.info("stopping desktop notifications") + if _log.isEnabledFor(_INFO): + _log.info("stopping desktop notifications") _notifications.clear() Notify.uninit() diff --git a/lib/solaar/ui/window.py b/lib/solaar/ui/window.py index b377a78b..11f30fe1 100644 --- a/lib/solaar/ui/window.py +++ b/lib/solaar/ui/window.py @@ -4,7 +4,7 @@ from __future__ import absolute_import, division, print_function, unicode_literals -from logging import getLogger, DEBUG as _DEBUG +from logging import getLogger # , DEBUG as _DEBUG _log = getLogger(__name__) del getLogger