mirror of
https://github.com/esphome/esphome.git
synced 2024-11-18 11:06:11 +01:00
fix python lint
This commit is contained in:
parent
625e328e97
commit
f7d9af3eaf
@ -1,9 +1,13 @@
|
||||
import esphome.codegen as cg
|
||||
from typing import Union
|
||||
import esphome.codegen as cg
|
||||
from esphome.core import CORE
|
||||
from esphome.helpers import (
|
||||
write_file_if_changed,
|
||||
)
|
||||
from esphome.const import (
|
||||
CONF_VARIANT,
|
||||
CONF_BOARD,
|
||||
)
|
||||
from .const import (
|
||||
ZEPHYR_VARIANT_GENERIC,
|
||||
ZEPHYR_VARIANT_NRF_SDK,
|
||||
@ -12,10 +16,6 @@ from .const import (
|
||||
KEY_OVERLAY,
|
||||
zephyr_ns,
|
||||
)
|
||||
from esphome.const import (
|
||||
CONF_VARIANT,
|
||||
CONF_BOARD,
|
||||
)
|
||||
|
||||
|
||||
AUTO_LOAD = ["preferences"]
|
||||
|
@ -8,7 +8,7 @@ from bleak.exc import BleakDeviceNotFoundError, BleakDBusError
|
||||
from smpclient.transport.ble import SMPBLETransport
|
||||
from smpclient.transport.serial import SMPSerialTransport
|
||||
from smpclient import SMPClient
|
||||
from smpclient.mcuboot import IMAGE_TLV, ImageInfo, TLVNotFound
|
||||
from smpclient.mcuboot import IMAGE_TLV, ImageInfo, TLVNotFound, MCUBootImageError
|
||||
from smpclient.requests.image_management import ImageStatesRead, ImageStatesWrite
|
||||
from smpclient.requests.os_management import ResetWrite
|
||||
from smpclient.generics import error, success
|
||||
@ -71,7 +71,7 @@ def get_image_tlv_sha256(file):
|
||||
image_info = ImageInfo.load_file(str(file))
|
||||
pprint(image_info.header)
|
||||
_LOGGER.debug(str(image_info))
|
||||
except Exception as e:
|
||||
except MCUBootImageError as e:
|
||||
_LOGGER.error("Inspection of FW image failed: %s", e)
|
||||
return None
|
||||
|
||||
|
@ -541,6 +541,7 @@ def lint_relative_py_import(fname):
|
||||
"esphome/components/rp2040/core.cpp",
|
||||
"esphome/components/libretiny/core.cpp",
|
||||
"esphome/components/host/core.cpp",
|
||||
"esphome/components/zephyr/core.cpp",
|
||||
],
|
||||
)
|
||||
def lint_namespace(fname, content):
|
||||
|
Loading…
Reference in New Issue
Block a user