[code-quality] Apply ruff linting suggestions (#7239)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
tomaszduda23 2024-08-13 02:47:18 +02:00 committed by GitHub
parent f24fd34d86
commit 8d5be27746
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,8 +1,6 @@
from esphome.core import CORE
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components.esp32 import add_idf_sdkconfig_option
import esphome.config_validation as cv
from esphome.const import (
CONF_ENABLE_IPV6,
CONF_MIN_IPV6_ADDR_COUNT,
@ -10,6 +8,7 @@ from esphome.const import (
PLATFORM_ESP8266,
PLATFORM_RP2040,
)
from esphome.core import CORE
CODEOWNERS = ["@esphome/core"]
AUTO_LOAD = ["mdns"]
@ -42,8 +41,7 @@ async def to_code(config):
if CORE.using_esp_idf:
add_idf_sdkconfig_option("CONFIG_LWIP_IPV6", enable_ipv6)
add_idf_sdkconfig_option("CONFIG_LWIP_IPV6_AUTOCONFIG", enable_ipv6)
else:
if enable_ipv6:
elif enable_ipv6:
cg.add_build_flag("-DCONFIG_LWIP_IPV6")
cg.add_build_flag("-DCONFIG_LWIP_IPV6_AUTOCONFIG")
if CORE.is_rp2040: