isort: intial import fix
Signed-off-by: Filipe Laíns <lains@archlinux.org>
This commit is contained in:
parent
be4e88dc1a
commit
e6369e0c3c
|
@ -20,17 +20,6 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__version__ = '0.9'
|
||||
from hidapi.udev import close, enumerate, get_manufacturer, get_product, get_serial, monitor_glib, open, open_path, read, write
|
||||
|
||||
from hidapi.udev import (
|
||||
enumerate,
|
||||
open,
|
||||
close,
|
||||
open_path,
|
||||
monitor_glib,
|
||||
read,
|
||||
write,
|
||||
get_manufacturer,
|
||||
get_product,
|
||||
get_serial,
|
||||
)
|
||||
__version__ = '0.9'
|
||||
|
|
|
@ -21,9 +21,12 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
|||
|
||||
import os
|
||||
import sys
|
||||
from select import select as _select
|
||||
import time
|
||||
|
||||
from binascii import hexlify, unhexlify
|
||||
from select import select as _select
|
||||
from threading import Lock
|
||||
|
||||
import hidapi as _hid
|
||||
|
||||
#
|
||||
|
@ -59,7 +62,6 @@ except:
|
|||
#
|
||||
#
|
||||
|
||||
from threading import Lock
|
||||
print_lock = Lock()
|
||||
del Lock
|
||||
|
||||
|
|
|
@ -27,17 +27,21 @@ necessary.
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
import os as _os
|
||||
import errno as _errno
|
||||
from time import sleep
|
||||
from select import select as _select
|
||||
from pyudev import Context as _Context, Monitor as _Monitor, Device as _Device
|
||||
from pyudev import DeviceNotFoundError
|
||||
|
||||
native_implementation = 'udev'
|
||||
import os as _os
|
||||
|
||||
# the tuple object we'll expose when enumerating devices
|
||||
from collections import namedtuple
|
||||
from select import select as _select
|
||||
from time import sleep
|
||||
|
||||
from pyudev import Context as _Context
|
||||
from pyudev import Device as _Device
|
||||
from pyudev import DeviceNotFoundError
|
||||
from pyudev import Monitor as _Monitor
|
||||
|
||||
native_implementation = 'udev'
|
||||
|
||||
DeviceInfo = namedtuple('DeviceInfo', [
|
||||
'path',
|
||||
'vendor_id',
|
||||
|
|
|
@ -33,6 +33,12 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
|||
|
||||
import logging
|
||||
|
||||
from . import listener, status
|
||||
from .base import DeviceUnreachable, NoReceiver, NoSuchDevice
|
||||
from .common import strhex
|
||||
from .hidpp20 import FeatureCallError, FeatureNotSupported
|
||||
from .receiver import PairedDevice, Receiver
|
||||
|
||||
_DEBUG = logging.DEBUG
|
||||
_log = logging.getLogger(__name__)
|
||||
_log.setLevel(logging.root.level)
|
||||
|
@ -43,11 +49,3 @@ _log.setLevel(logging.root.level)
|
|||
del logging
|
||||
|
||||
__version__ = '0.9'
|
||||
|
||||
from .common import strhex
|
||||
from .base import NoReceiver, NoSuchDevice, DeviceUnreachable
|
||||
from .receiver import Receiver, PairedDevice
|
||||
from .hidpp20 import FeatureNotSupported, FeatureCallError
|
||||
|
||||
from . import listener
|
||||
from . import status
|
||||
|
|
|
@ -22,17 +22,23 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from time import time as _timestamp
|
||||
from collections import namedtuple
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import getLogger
|
||||
from random import getrandbits as _random_bits
|
||||
from time import time as _timestamp
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
import hidapi as _hid
|
||||
|
||||
from .common import strhex as _strhex, KwException as _KwException, pack as _pack
|
||||
from . import hidpp10 as _hidpp10
|
||||
from . import hidpp20 as _hidpp20
|
||||
import hidapi as _hid
|
||||
from .base_usb import ALL as _RECEIVER_USB_IDS
|
||||
from .common import KwException as _KwException
|
||||
from .common import pack as _pack
|
||||
from .common import strhex as _strhex
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
#
|
||||
#
|
||||
|
@ -86,8 +92,6 @@ class DeviceUnreachable(_KwException):
|
|||
#
|
||||
#
|
||||
|
||||
from .base_usb import ALL as _RECEIVER_USB_IDS
|
||||
|
||||
|
||||
def receivers():
|
||||
"""List all the Linux devices exposed by the UR attached to the machine."""
|
||||
|
@ -305,7 +309,6 @@ def make_notification(devnumber, data):
|
|||
return _HIDPP_Notification(devnumber, sub_id, address, data[2:])
|
||||
|
||||
|
||||
from collections import namedtuple
|
||||
_HIDPP_Notification = namedtuple('_HIDPP_Notification',
|
||||
('devnumber', 'sub_id', 'address', 'data'))
|
||||
_HIDPP_Notification.__str__ = lambda self: 'Notification(%d,%02X,%02X,%s)' % (
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from binascii import hexlify as _hexlify
|
||||
from collections import namedtuple
|
||||
from struct import pack, unpack
|
||||
|
||||
try:
|
||||
unicode
|
||||
# if Python2, unicode_literals will mess our first (un)pack() argument
|
||||
|
@ -278,7 +280,6 @@ class KwException(Exception):
|
|||
return self.args[0][k]
|
||||
|
||||
|
||||
from collections import namedtuple
|
||||
"""Firmware information."""
|
||||
FirmwareInfo = namedtuple('FirmwareInfo',
|
||||
['kind', 'name', 'version', 'extras'])
|
||||
|
|
|
@ -19,15 +19,18 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from .common import NamedInts as _NamedInts
|
||||
from .hidpp10 import REGISTERS as _R, DEVICE_KIND as _DK
|
||||
from .settings_templates import RegisterSettings as _RS, FeatureSettings as _FS
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
from .common import NamedInts as _NamedInts
|
||||
from .hidpp10 import DEVICE_KIND as _DK
|
||||
from .hidpp10 import REGISTERS as _R
|
||||
from .settings_templates import FeatureSettings as _FS
|
||||
from .settings_templates import RegisterSettings as _RS
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
_DeviceDescriptor = namedtuple('_DeviceDescriptor',
|
||||
('name', 'kind', 'wpid', 'codename', 'protocol',
|
||||
'registers', 'settings', 'persister'))
|
||||
|
|
|
@ -20,14 +20,17 @@
|
|||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logging import getLogger # , DEBUG as _DEBUG
|
||||
|
||||
from .common import FirmwareInfo as _FirmwareInfo
|
||||
from .common import NamedInts as _NamedInts
|
||||
from .common import bytes2int as _bytes2int
|
||||
from .common import int2bytes as _int2bytes
|
||||
from .common import strhex as _strhex
|
||||
from .hidpp20 import BATTERY_STATUS, FIRMWARE_KIND
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
from .common import (strhex as _strhex, bytes2int as _bytes2int, int2bytes as
|
||||
_int2bytes, NamedInts as _NamedInts, FirmwareInfo as
|
||||
_FirmwareInfo)
|
||||
from .hidpp20 import FIRMWARE_KIND, BATTERY_STATUS
|
||||
|
||||
#
|
||||
# Constants - most of them as defined by the official Logitech HID++ 1.0
|
||||
# documentation, some of them guessed.
|
||||
|
|
|
@ -21,16 +21,21 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import getLogger
|
||||
|
||||
from . import special_keys
|
||||
from .common import FirmwareInfo as _FirmwareInfo
|
||||
from .common import KwException as _KwException
|
||||
from .common import NamedInts as _NamedInts
|
||||
from .common import ReprogrammableKeyInfo as _ReprogrammableKeyInfo
|
||||
from .common import ReprogrammableKeyInfoV4 as _ReprogrammableKeyInfoV4
|
||||
from .common import pack as _pack
|
||||
from .common import unpack as _unpack
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
from .common import (FirmwareInfo as _FirmwareInfo, ReprogrammableKeyInfo as
|
||||
_ReprogrammableKeyInfo, ReprogrammableKeyInfoV4 as
|
||||
_ReprogrammableKeyInfoV4, KwException as _KwException,
|
||||
NamedInts as _NamedInts, pack as _pack, unpack as _unpack)
|
||||
from . import special_keys
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
|
|
@ -20,6 +20,13 @@
|
|||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
import threading as _threading
|
||||
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import INFO as _INFO
|
||||
from logging import getLogger
|
||||
|
||||
from . import base as _base
|
||||
|
||||
# from time import time as _timestamp
|
||||
|
||||
# for both Python 2 and 3
|
||||
|
@ -28,12 +35,9 @@ try:
|
|||
except ImportError:
|
||||
from queue import Queue as _Queue
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG, INFO as _INFO
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
from . import base as _base
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
|
|
@ -22,16 +22,21 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG, INFO as _INFO
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import INFO as _INFO
|
||||
from logging import getLogger
|
||||
|
||||
from .i18n import _
|
||||
from .common import strhex as _strhex, unpack as _unpack
|
||||
from . import hidpp10 as _hidpp10
|
||||
from . import hidpp20 as _hidpp20
|
||||
from .status import KEYS as _K, ALERT as _ALERT
|
||||
from .base import DJ_NOTIFICATION_LENGTH as _DJ_NOTIFICATION_LENGTH
|
||||
from .common import strhex as _strhex
|
||||
from .common import unpack as _unpack
|
||||
from .i18n import _
|
||||
from .status import ALERT as _ALERT
|
||||
from .status import KEYS as _K
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
_R = _hidpp10.REGISTERS
|
||||
_F = _hidpp20.FEATURE
|
||||
|
|
|
@ -21,18 +21,20 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
|||
|
||||
import errno as _errno
|
||||
|
||||
from logging import getLogger, INFO as _INFO
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
from logging import INFO as _INFO
|
||||
from logging import getLogger
|
||||
|
||||
from .i18n import _
|
||||
from . import base as _base
|
||||
from . import hidpp10 as _hidpp10
|
||||
from . import hidpp20 as _hidpp20
|
||||
from .base_usb import product_information as _product_information
|
||||
from .common import strhex as _strhex
|
||||
from .descriptors import DEVICES as _DESCRIPTORS
|
||||
from .i18n import _
|
||||
from .settings_templates import check_feature_settings as _check_feature_settings
|
||||
from .base_usb import product_information as _product_information
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
_R = _hidpp10.REGISTERS
|
||||
|
||||
|
|
|
@ -19,19 +19,20 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG, INFO as _INFO
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
from copy import copy as _copy
|
||||
import math
|
||||
|
||||
from .common import (
|
||||
NamedInt as _NamedInt,
|
||||
NamedInts as _NamedInts,
|
||||
bytes2int as _bytes2int,
|
||||
int2bytes as _int2bytes,
|
||||
)
|
||||
from copy import copy as _copy
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import INFO as _INFO
|
||||
from logging import getLogger
|
||||
|
||||
from .common import NamedInt as _NamedInt
|
||||
from .common import NamedInts as _NamedInts
|
||||
from .common import bytes2int as _bytes2int
|
||||
from .common import int2bytes as _int2bytes
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
#
|
||||
#
|
||||
|
|
|
@ -19,36 +19,35 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
from collections import namedtuple
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import getLogger
|
||||
|
||||
from .i18n import _
|
||||
from . import hidpp10 as _hidpp10
|
||||
from . import hidpp20 as _hidpp20
|
||||
from . import special_keys as _special_keys
|
||||
from .common import (
|
||||
bytes2int as _bytes2int,
|
||||
int2bytes as _int2bytes,
|
||||
NamedInt as _NamedInt,
|
||||
NamedInts as _NamedInts,
|
||||
unpack as _unpack,
|
||||
ReprogrammableKeyInfoV4 as _ReprogrammableKeyInfoV4,
|
||||
)
|
||||
from .settings import (
|
||||
KIND as _KIND,
|
||||
Setting as _Setting,
|
||||
BitFieldSetting as _BitFieldSetting,
|
||||
Settings as _Settings,
|
||||
RegisterRW as _RegisterRW,
|
||||
FeatureRW as _FeatureRW,
|
||||
FeatureRWMap as _FeatureRWMap,
|
||||
BooleanValidator as _BooleanV,
|
||||
BitFieldValidator as _BitFieldV,
|
||||
ChoicesValidator as _ChoicesV,
|
||||
ChoicesMapValidator as _ChoicesMapV,
|
||||
RangeValidator as _RangeV,
|
||||
)
|
||||
from .common import NamedInt as _NamedInt
|
||||
from .common import NamedInts as _NamedInts
|
||||
from .common import ReprogrammableKeyInfoV4 as _ReprogrammableKeyInfoV4
|
||||
from .common import bytes2int as _bytes2int
|
||||
from .common import int2bytes as _int2bytes
|
||||
from .common import unpack as _unpack
|
||||
from .i18n import _
|
||||
from .settings import KIND as _KIND
|
||||
from .settings import BitFieldSetting as _BitFieldSetting
|
||||
from .settings import BitFieldValidator as _BitFieldV
|
||||
from .settings import BooleanValidator as _BooleanV
|
||||
from .settings import ChoicesMapValidator as _ChoicesMapV
|
||||
from .settings import ChoicesValidator as _ChoicesV
|
||||
from .settings import FeatureRW as _FeatureRW
|
||||
from .settings import FeatureRWMap as _FeatureRWMap
|
||||
from .settings import RangeValidator as _RangeV
|
||||
from .settings import RegisterRW as _RegisterRW
|
||||
from .settings import Setting as _Setting
|
||||
from .settings import Settings as _Settings
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
_DK = _hidpp10.DEVICE_KIND
|
||||
_R = _hidpp10.REGISTERS
|
||||
|
@ -670,8 +669,6 @@ def _feature_disable_keyboard_keys():
|
|||
#
|
||||
#
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
|
||||
def _S(name, featureID=None, featureFn=None, registerFn=None, identifier=None):
|
||||
return (name, featureID, featureFn, registerFn,
|
||||
|
|
|
@ -19,16 +19,18 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import getLogger
|
||||
from time import time as _timestamp
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
from .i18n import _, ngettext
|
||||
from .common import NamedInts as _NamedInts, NamedInt as _NamedInt
|
||||
from . import hidpp10 as _hidpp10
|
||||
from . import hidpp20 as _hidpp20
|
||||
from .common import NamedInt as _NamedInt
|
||||
from .common import NamedInts as _NamedInts
|
||||
from .i18n import _, ngettext
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
_R = _hidpp10.REGISTERS
|
||||
|
||||
|
|
|
@ -22,12 +22,14 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
|||
import argparse as _argparse
|
||||
import sys as _sys
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import getLogger
|
||||
|
||||
from solaar import NAME
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from solaar import configuration as _configuration
|
||||
from logitech_receiver import settings as _settings
|
||||
from solaar import configuration as _configuration
|
||||
|
||||
|
||||
def _print_setting(s, verbose=True):
|
||||
|
|
|
@ -21,12 +21,10 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
|||
|
||||
from time import time as _timestamp
|
||||
|
||||
from logitech_receiver import (
|
||||
base as _base,
|
||||
hidpp10 as _hidpp10,
|
||||
status as _status,
|
||||
notifications as _notifications,
|
||||
)
|
||||
from logitech_receiver import base as _base
|
||||
from logitech_receiver import hidpp10 as _hidpp10
|
||||
from logitech_receiver import notifications as _notifications
|
||||
from logitech_receiver import status as _status
|
||||
|
||||
|
||||
def run(receivers, args, find_receiver, _ignore):
|
||||
|
|
|
@ -21,19 +21,15 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
|||
|
||||
from time import time as _timestamp
|
||||
|
||||
from logitech_receiver import base as _base
|
||||
from logitech_receiver import hidpp10 as _hidpp10
|
||||
from logitech_receiver import notifications as _notifications
|
||||
from logitech_receiver import status as _status
|
||||
from logitech_receiver.common import strhex as _strhex
|
||||
|
||||
from logitech_receiver import (
|
||||
base as _base,
|
||||
hidpp10 as _hidpp10,
|
||||
status as _status,
|
||||
notifications as _notifications,
|
||||
)
|
||||
from solaar.cli.show import _print_receiver
|
||||
|
||||
_R = _hidpp10.REGISTERS
|
||||
|
||||
from solaar.cli.show import _print_receiver
|
||||
|
||||
|
||||
def run(receivers, args, find_receiver, _ignore):
|
||||
assert receivers
|
||||
|
|
|
@ -19,9 +19,10 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logitech_receiver import (hidpp10 as _hidpp10, hidpp20 as _hidpp20,
|
||||
special_keys as _special_keys,
|
||||
settings_templates as _settings_templates)
|
||||
from logitech_receiver import hidpp10 as _hidpp10
|
||||
from logitech_receiver import hidpp20 as _hidpp20
|
||||
from logitech_receiver import settings_templates as _settings_templates
|
||||
from logitech_receiver import special_keys as _special_keys
|
||||
from logitech_receiver.common import NamedInt as _NamedInt
|
||||
|
||||
|
||||
|
|
|
@ -19,9 +19,15 @@
|
|||
|
||||
import os as _os
|
||||
import os.path as _path
|
||||
from json import load as _json_load, dump as _json_save
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG, INFO as _INFO
|
||||
from json import dump as _json_save
|
||||
from json import load as _json_load
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import INFO as _INFO
|
||||
from logging import getLogger
|
||||
|
||||
from solaar import __version__
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
|
@ -29,7 +35,6 @@ _XDG_CONFIG_HOME = _os.environ.get('XDG_CONFIG_HOME') or _path.expanduser(
|
|||
_path.join('~', '.config'))
|
||||
_file_path = _path.join(_XDG_CONFIG_HOME, 'solaar', 'config.json')
|
||||
|
||||
from solaar import __version__
|
||||
_KEY_VERSION = '_version'
|
||||
_KEY_NAME = '_name'
|
||||
_configuration = {}
|
||||
|
|
|
@ -22,9 +22,10 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
|||
|
||||
import importlib
|
||||
|
||||
from solaar import __version__, NAME
|
||||
import solaar.i18n as _i18n
|
||||
import solaar.cli as _cli
|
||||
import solaar.i18n as _i18n
|
||||
|
||||
from solaar import NAME, __version__
|
||||
|
||||
#
|
||||
#
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
import gettext as _gettext
|
||||
import locale
|
||||
|
||||
from solaar import NAME as _NAME
|
||||
|
||||
#
|
||||
|
@ -48,7 +51,6 @@ def _find_locale_path(lc_domain):
|
|||
# del _path
|
||||
|
||||
|
||||
import locale
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
language, encoding = locale.getlocale()
|
||||
del locale
|
||||
|
@ -56,8 +58,6 @@ del locale
|
|||
_LOCALE_DOMAIN = _NAME.lower()
|
||||
path = _find_locale_path(_LOCALE_DOMAIN)
|
||||
|
||||
import gettext as _gettext
|
||||
|
||||
_gettext.bindtextdomain(_LOCALE_DOMAIN, path)
|
||||
_gettext.textdomain(_LOCALE_DOMAIN)
|
||||
_gettext.install(_LOCALE_DOMAIN)
|
||||
|
|
|
@ -18,22 +18,30 @@
|
|||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
import time
|
||||
|
||||
from logging import getLogger, INFO as _INFO, WARNING as _WARNING
|
||||
from collections import namedtuple
|
||||
from logging import INFO as _INFO
|
||||
from logging import WARNING as _WARNING
|
||||
from logging import getLogger
|
||||
|
||||
from logitech_receiver import Receiver
|
||||
from logitech_receiver import base as _base
|
||||
from logitech_receiver import listener as _listener
|
||||
from logitech_receiver import notifications as _notifications
|
||||
from logitech_receiver import status as _status
|
||||
from solaar.i18n import _
|
||||
|
||||
from . import configuration
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
from solaar.i18n import _
|
||||
from . import configuration
|
||||
from logitech_receiver import (Receiver, listener as _listener, status as
|
||||
_status, notifications as _notifications)
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
from collections import namedtuple
|
||||
_GHOST_DEVICE = namedtuple(
|
||||
'_GHOST_DEVICE',
|
||||
('receiver', 'number', 'name', 'kind', 'status', 'online'))
|
||||
|
@ -323,7 +331,6 @@ def ping_all(resuming=False):
|
|||
break
|
||||
|
||||
|
||||
from logitech_receiver import base as _base
|
||||
_status_callback = None
|
||||
_error_callback = None
|
||||
|
||||
|
|
|
@ -20,12 +20,13 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import getLogger
|
||||
from threading import Thread as _Thread
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
from threading import Thread as _Thread
|
||||
|
||||
try:
|
||||
from Queue import Queue as _Queue
|
||||
except ImportError:
|
||||
|
|
|
@ -19,14 +19,16 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import getLogger
|
||||
|
||||
from gi.repository import GLib, Gtk
|
||||
|
||||
from logitech_receiver.status import ALERT
|
||||
from solaar.i18n import _
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
@ -88,7 +90,7 @@ def ui_async(function, *args, **kwargs):
|
|||
#
|
||||
#
|
||||
|
||||
from . import notify, tray, window
|
||||
from . import notify, tray, window # isort:skip # noqa: E402
|
||||
|
||||
|
||||
def _startup(app, startup_hook, use_tray, show_window):
|
||||
|
@ -161,8 +163,6 @@ def run_loop(startup_hook, shutdown_hook, use_tray, show_window, args=None):
|
|||
#
|
||||
#
|
||||
|
||||
from logitech_receiver.status import ALERT
|
||||
|
||||
|
||||
def _status_changed(device, alert, reason):
|
||||
assert device is not None
|
||||
|
|
|
@ -20,8 +20,7 @@
|
|||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from gi.repository import Gtk
|
||||
|
||||
from solaar import __version__, NAME
|
||||
from solaar import NAME, __version__
|
||||
from solaar.i18n import _
|
||||
|
||||
#
|
||||
|
|
|
@ -19,14 +19,18 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from gi.repository import Gtk, Gdk
|
||||
from gi.repository import Gdk, Gtk
|
||||
from solaar import NAME
|
||||
from solaar.i18n import _
|
||||
|
||||
from ..ui import error_dialog
|
||||
from . import pair_window
|
||||
from .about import show_window as _show_about_window
|
||||
|
||||
# from logging import getLogger
|
||||
# _log = getLogger(__name__)
|
||||
# del getLogger
|
||||
|
||||
from solaar.i18n import _
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
@ -63,8 +67,6 @@ def make_toggle(name, label, function, stock_id=None, *args):
|
|||
# action.set_sensitive(notify.available)
|
||||
# toggle_notifications = make_toggle('notifications', 'Notifications', _toggle_notifications)
|
||||
|
||||
from .about import show_window as _show_about_window
|
||||
from solaar import NAME
|
||||
about = make('help-about',
|
||||
_("About") + ' ' + NAME,
|
||||
_show_about_window,
|
||||
|
@ -74,8 +76,6 @@ about = make('help-about',
|
|||
#
|
||||
#
|
||||
|
||||
from . import pair_window
|
||||
|
||||
|
||||
def pair(window, receiver):
|
||||
assert receiver
|
||||
|
@ -90,9 +90,6 @@ def pair(window, receiver):
|
|||
pair_dialog.present()
|
||||
|
||||
|
||||
from ..ui import error_dialog
|
||||
|
||||
|
||||
def unpair(window, device):
|
||||
assert device
|
||||
assert device.kind is not None
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from gi.repository import Gtk, GLib
|
||||
from threading import Timer as _Timer
|
||||
|
||||
from gi.repository import GLib, Gtk
|
||||
from logitech_receiver.settings import KIND as _SETTING_KIND
|
||||
from solaar.i18n import _
|
||||
from solaar.ui import ui_async as _ui_async
|
||||
from logitech_receiver.settings import KIND as _SETTING_KIND
|
||||
|
||||
#
|
||||
#
|
||||
|
|
|
@ -19,12 +19,15 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import getLogger
|
||||
|
||||
import solaar.gtk as gtk
|
||||
|
||||
from gi.repository import Gtk
|
||||
import solaar.gtk as gtk
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
#
|
||||
#
|
||||
|
|
|
@ -19,16 +19,18 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from gi.repository import Gtk, GLib
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import getLogger
|
||||
|
||||
from gi.repository import GLib, Gtk
|
||||
from logitech_receiver.status import KEYS as _K
|
||||
from solaar.i18n import _
|
||||
|
||||
from . import icons as _icons
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
from solaar.i18n import _
|
||||
from . import icons as _icons
|
||||
from logitech_receiver.status import KEYS as _K
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
|
|
@ -18,22 +18,25 @@
|
|||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import getLogger
|
||||
from time import time as _timestamp
|
||||
|
||||
from gi.repository import Gtk, GLib
|
||||
from gi.repository import GLib, Gtk
|
||||
from gi.repository.Gdk import ScrollDirection
|
||||
|
||||
from logitech_receiver.status import KEYS as _K
|
||||
from solaar import NAME
|
||||
from solaar.i18n import _
|
||||
from logitech_receiver.status import KEYS as _K
|
||||
|
||||
from . import icons as _icons
|
||||
from .window import popup as _window_popup, toggle as _window_toggle
|
||||
from .window import popup as _window_popup
|
||||
from .window import toggle as _window_toggle
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
#
|
||||
# constants
|
||||
|
|
|
@ -19,24 +19,28 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logging import getLogger, DEBUG as _DEBUG
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import getLogger
|
||||
|
||||
from gi.repository import Gtk, Gdk, GLib
|
||||
from gi.repository import Gdk, GLib, Gtk
|
||||
from gi.repository.GObject import TYPE_PYOBJECT
|
||||
|
||||
from logitech_receiver import hidpp10 as _hidpp10
|
||||
from logitech_receiver.common import NamedInt as _NamedInt
|
||||
from logitech_receiver.common import NamedInts as _NamedInts
|
||||
from logitech_receiver.status import KEYS as _K
|
||||
from solaar import NAME
|
||||
from solaar.i18n import _, ngettext
|
||||
# from solaar import __version__ as VERSION
|
||||
from solaar.ui import ui_async as _ui_async
|
||||
from logitech_receiver import hidpp10 as _hidpp10
|
||||
from logitech_receiver.common import NamedInts as _NamedInts, NamedInt as _NamedInt
|
||||
from logitech_receiver.status import KEYS as _K
|
||||
|
||||
from . import action as _action
|
||||
from . import config_panel as _config_panel
|
||||
from . import action as _action, icons as _icons
|
||||
from . import icons as _icons
|
||||
from .about import show_window as _show_about_window
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
#
|
||||
# constants
|
||||
#
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from logging import getLogger, INFO as _INFO
|
||||
from logging import INFO as _INFO
|
||||
from logging import getLogger
|
||||
|
||||
_log = getLogger(__name__)
|
||||
del getLogger
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
import sys
|
||||
sys.path += (sys.path[0] + '/../lib', )
|
||||
|
||||
import hidapi
|
||||
from logitech.unifying_receiver.base import DEVICE_UNIFYING_RECEIVER
|
||||
from logitech.unifying_receiver.base import DEVICE_UNIFYING_RECEIVER_2
|
||||
from logitech.unifying_receiver.base import DEVICE_NANO_RECEIVER
|
||||
|
||||
from logitech.unifying_receiver.base import DEVICE_NANO_RECEIVER, DEVICE_UNIFYING_RECEIVER, DEVICE_UNIFYING_RECEIVER_2
|
||||
|
||||
sys.path += (sys.path[0] + '/../lib', )
|
||||
|
||||
|
||||
def print_event(action, device):
|
||||
|
|
Loading…
Reference in New Issue