From 65ee4648f443e12245b0a4596a6987eda48032f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ndor=20Bal=C3=A1zs?= Date: Wed, 13 May 2020 20:30:22 +0200 Subject: [PATCH] chore: fix lint errors --- test.py | 2 +- zigpy_cc/types.py | 1 + zigpy_cc/uart.py | 5 +++-- zigpy_cc/zigbee/application.py | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test.py b/test.py index e5f6872..0196d3e 100644 --- a/test.py +++ b/test.py @@ -80,7 +80,7 @@ async def main(): await app.startup(auto_form=False) await app.form_network() - #await app.permit_ncp() + # await app.permit_ncp() loop.run_until_complete(main()) diff --git a/zigpy_cc/types.py b/zigpy_cc/types.py index 5375c60..910ef5c 100644 --- a/zigpy_cc/types.py +++ b/zigpy_cc/types.py @@ -24,6 +24,7 @@ class LedMode(uint8_t, enum.Enum): Flash = 3 Toggle = 4 + class ZnpVersion(uint8_t, enum.Enum): zStack12 = 0 zStack3x0 = 1 diff --git a/zigpy_cc/uart.py b/zigpy_cc/uart.py index a6ee374..141c77d 100644 --- a/zigpy_cc/uart.py +++ b/zigpy_cc/uart.py @@ -21,13 +21,14 @@ MinMessageLength = 5 MaxDataSize = 250 -'''' +""" 0451: Texas Instruments 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter used in zzh - https://electrolama.com/projects/zig-a-zig-ah/ -''' +""" usb_regexp = "0451:|1a86:7523" + class Parser: def __init__(self) -> None: self.buffer = b"" diff --git a/zigpy_cc/zigbee/application.py b/zigpy_cc/zigbee/application.py index c5205b3..c1c480d 100644 --- a/zigpy_cc/zigbee/application.py +++ b/zigpy_cc/zigbee/application.py @@ -357,7 +357,9 @@ def set_led(self, mode: LedMode): try: loop = asyncio.get_event_loop() loop.create_task( - self._api.request(Subsystem.UTIL, "ledControl", {"ledid": 3, "mode": mode}) + self._api.request( + Subsystem.UTIL, "ledControl", {"ledid": 3, "mode": mode} + ) ) except Exception as ex: LOGGER.warning("Can't set LED: %s", ex)