1
0
mirror of https://github.com/esphome/esphome.git synced 2024-10-04 18:27:06 +02:00

[code-quality] Organise esp8266 python imports

This commit is contained in:
Jesse Hills 2024-07-22 13:24:25 +12:00
parent a464e46d4d
commit c29277dc92
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
2 changed files with 9 additions and 11 deletions

View File

@ -1,10 +1,13 @@
import logging
import os
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.const import (
CONF_BOARD,
CONF_BOARD_FLASH_MODE,
CONF_FRAMEWORK,
CONF_PLATFORM_VERSION,
CONF_SOURCE,
CONF_VERSION,
KEY_CORE,
@ -12,27 +15,22 @@ from esphome.const import (
KEY_TARGET_FRAMEWORK,
KEY_TARGET_PLATFORM,
PLATFORM_ESP8266,
CONF_PLATFORM_VERSION,
)
from esphome.core import CORE, coroutine_with_priority
import esphome.config_validation as cv
import esphome.codegen as cg
from esphome.helpers import copy_file_if_changed
from .boards import BOARDS, ESP8266_LD_SCRIPTS
from .const import (
CONF_RESTORE_FROM_FLASH,
CONF_EARLY_PIN_INIT,
CONF_RESTORE_FROM_FLASH,
KEY_BOARD,
KEY_ESP8266,
KEY_FLASH_SIZE,
KEY_PIN_INITIAL_STATES,
esp8266_ns,
)
from .boards import BOARDS, ESP8266_LD_SCRIPTS
from .gpio import PinInitialState, add_pin_initial_states_array
CODEOWNERS = ["@esphome/core"]
_LOGGER = logging.getLogger(__name__)
AUTO_LOAD = ["preferences"]

View File

@ -1,6 +1,9 @@
import logging
from dataclasses import dataclass
import logging
from esphome import pins
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.const import (
CONF_ANALOG,
CONF_ID,
@ -14,10 +17,7 @@ from esphome.const import (
CONF_PULLUP,
PLATFORM_ESP8266,
)
from esphome import pins
from esphome.core import CORE, coroutine_with_priority
import esphome.config_validation as cv
import esphome.codegen as cg
from . import boards
from .const import KEY_BOARD, KEY_ESP8266, KEY_PIN_INITIAL_STATES, esp8266_ns