1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 10:52:19 +01:00

Bump ruff from 0.9.2 to 0.11.0 (#8409)

This commit is contained in:
dependabot[bot]
2025-03-20 09:51:23 -10:00
committed by GitHub
parent 6ea89644e7
commit 4adda632bb
651 changed files with 1962 additions and 2270 deletions

View File

@@ -17,12 +17,12 @@ then run this script with python3 and the files
will be generated, they still need to be formatted
"""
import os
import re
import sys
from abc import ABC, abstractmethod
import os
from pathlib import Path
import re
from subprocess import call
import sys
from textwrap import dedent
# Generate with
@@ -528,7 +528,7 @@ class RepeatedTypeInfo(TypeInfo):
@property
def dump_content(self):
o = f'for (const auto {"" if self._ti_is_bool else "&"}it : this->{self.field_name}) {{\n'
o = f"for (const auto {'' if self._ti_is_bool else '&'}it : this->{self.field_name}) {{\n"
o += f' out.append(" {self.name}: ");\n'
o += indent(self._ti.dump("it")) + "\n"
o += ' out.append("\\n");\n'

View File

@@ -85,8 +85,8 @@ def load_components():
# pylint: disable=wrong-import-position
from esphome.const import CONF_TYPE, KEY_CORE, KEY_TARGET_PLATFORM
from esphome.core import CORE
from esphome.const import CONF_TYPE, KEY_CORE, KEY_TARGET_PLATFORM # noqa: E402
from esphome.core import CORE # noqa: E402
# pylint: enable=wrong-import-position
@@ -95,13 +95,13 @@ load_components()
# Import esphome after loading components (so schema is tracked)
# pylint: disable=wrong-import-position
from esphome import automation, pins
from esphome.components import remote_base
import esphome.config_validation as cv
import esphome.core as esphome_core
from esphome.helpers import write_file_if_changed
from esphome.loader import CORE_COMPONENTS_PATH, get_platform
from esphome.util import Registry
from esphome import automation, pins # noqa: E402
from esphome.components import remote_base # noqa: E402
import esphome.config_validation as cv # noqa: E402
import esphome.core as esphome_core # noqa: E402
from esphome.helpers import write_file_if_changed # noqa: E402
from esphome.loader import CORE_COMPONENTS_PATH, get_platform # noqa: E402
from esphome.util import Registry # noqa: E402
# pylint: enable=wrong-import-position
@@ -614,9 +614,9 @@ def build_schema():
if platform_manifest is not None:
output[platform][S_COMPONENTS][domain] = {}
if len(platform_manifest.dependencies) > 0:
output[platform][S_COMPONENTS][domain][
"dependencies"
] = platform_manifest.dependencies
output[platform][S_COMPONENTS][domain]["dependencies"] = (
platform_manifest.dependencies
)
register_module_schemas(
f"{domain}.{platform}", platform_manifest.module, platform_manifest
)

View File

@@ -9,8 +9,8 @@ import sys
def find_and_activate_virtualenv():
if (
("VIRTUAL_ENV" in os.environ)
or os.environ.get("DEVCONTAINER", False)
or os.environ.get("ESPHOME_NO_VENV", False)
or os.environ.get("DEVCONTAINER")
or os.environ.get("ESPHOME_NO_VENV")
):
return