mirror of
https://github.com/esphome/esphome.git
synced 2025-09-22 13:12:22 +01:00
[ruff] Enable SIM rules and fix code simplification violations (#9872)
This commit is contained in:
@@ -86,21 +86,17 @@ def storage_should_clean(old: StorageJSON, new: StorageJSON) -> bool:
|
||||
|
||||
if old.src_version != new.src_version:
|
||||
return True
|
||||
if old.build_path != new.build_path:
|
||||
return True
|
||||
|
||||
return False
|
||||
return old.build_path != new.build_path
|
||||
|
||||
|
||||
def storage_should_update_cmake_cache(old: StorageJSON, new: StorageJSON) -> bool:
|
||||
if (
|
||||
old.loaded_integrations != new.loaded_integrations
|
||||
or old.loaded_platforms != new.loaded_platforms
|
||||
):
|
||||
if new.core_platform == PLATFORM_ESP32:
|
||||
from esphome.components.esp32 import FRAMEWORK_ESP_IDF
|
||||
) and new.core_platform == PLATFORM_ESP32:
|
||||
from esphome.components.esp32 import FRAMEWORK_ESP_IDF
|
||||
|
||||
return new.framework == FRAMEWORK_ESP_IDF
|
||||
return new.framework == FRAMEWORK_ESP_IDF
|
||||
return False
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user