LINT fixes
This commit is contained in:
parent
bf92d66be1
commit
fa0a5805be
5 changed files with 6 additions and 10 deletions
|
@ -66,12 +66,14 @@ class GpsBackend(Backend):
|
|||
if report.get('class').lower() == 'devices':
|
||||
for device in report.get('devices', []):
|
||||
if device.get('path') not in self._devices or device != self._devices.get('path'):
|
||||
# noinspection DuplicatedCode
|
||||
self._devices[device.get('path')] = device
|
||||
return GPSDeviceEvent(path=device.get('path'), activated=device.get('activated'),
|
||||
native=device.get('native'), bps=device.get('bps'),
|
||||
parity=device.get('parity'), stopbits=device.get('stopbits'),
|
||||
cycle=device.get('cycle'), driver=device.get('driver'))
|
||||
if report.get('class').lower() == 'device':
|
||||
# noinspection DuplicatedCode
|
||||
self._devices[report.get('path')] = report
|
||||
return GPSDeviceEvent(path=report.get('path'), activated=report.get('activated'),
|
||||
native=report.get('native'), bps=report.get('bps'),
|
||||
|
|
|
@ -46,4 +46,3 @@ class JoystickBackend(Backend):
|
|||
|
||||
|
||||
# vim:sw=4:ts=4:et:
|
||||
|
||||
|
|
|
@ -72,7 +72,6 @@ class MidiBackend(Backend):
|
|||
|
||||
self.midi.set_callback(self._on_midi_message())
|
||||
|
||||
|
||||
def _on_midi_message(self):
|
||||
def flush_midi_message(message):
|
||||
def _f():
|
||||
|
@ -81,6 +80,7 @@ class MidiBackend(Backend):
|
|||
self.bus.post(MidiMessageEvent(message=message, delay=delay))
|
||||
return _f
|
||||
|
||||
# noinspection PyUnusedLocal
|
||||
def callback(message, data):
|
||||
# rtmidi will provide a tuple in the format
|
||||
# (midi_message, time_since_last_event)
|
||||
|
@ -106,7 +106,6 @@ class MidiBackend(Backend):
|
|||
|
||||
return callback
|
||||
|
||||
|
||||
def run(self):
|
||||
super().run()
|
||||
|
||||
|
@ -126,4 +125,3 @@ class MidiBackend(Backend):
|
|||
|
||||
|
||||
# vim:sw=4:ts=4:et:
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import redis
|
||||
import socket
|
||||
import threading
|
||||
|
||||
from platypush.backend import Backend
|
||||
from platypush.message import Message
|
||||
from platypush.message.request import Request
|
||||
from platypush.utils import set_thread_name
|
||||
|
||||
|
||||
|
@ -40,7 +38,6 @@ class TcpBackend(Backend):
|
|||
open_brackets = 0
|
||||
msg = b''
|
||||
prev_ch = None
|
||||
redis = self._get_redis()
|
||||
|
||||
while True:
|
||||
if processed_bytes > self._MAX_REQ_SIZE:
|
||||
|
@ -111,4 +108,3 @@ class TcpBackend(Backend):
|
|||
|
||||
|
||||
# vim:sw=4:ts=4:et:
|
||||
|
||||
|
|
|
@ -109,6 +109,7 @@ class ZwaveBackend(Backend):
|
|||
self.device = device
|
||||
|
||||
if not config_path:
|
||||
# noinspection PyTypeChecker
|
||||
config_path = os.path.join(os.path.dirname(inspect.getfile(python_openzwave)), 'ozw_config')
|
||||
if not user_path:
|
||||
user_path = os.path.join(Config.get('workdir'), 'zwave')
|
||||
|
|
Loading…
Reference in a new issue