1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-05 21:02:20 +01:00

[ruff] Enable SIM rules and fix code simplification violations (#9872)

This commit is contained in:
J. Nick Koston
2025-07-24 20:26:08 -10:00
committed by GitHub
parent cb87f156d0
commit ffebd30033
72 changed files with 400 additions and 432 deletions

View File

@@ -2,7 +2,7 @@
from __future__ import annotations
from contextlib import contextmanager
from contextlib import contextmanager, suppress
from dataclasses import dataclass
from datetime import datetime
from ipaddress import (
@@ -2113,10 +2113,8 @@ def require_esphome_version(year, month, patch):
@contextmanager
def suppress_invalid():
try:
with suppress(vol.Invalid):
yield
except vol.Invalid:
pass
GIT_SCHEMA = Schema(