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:
@@ -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(
|
||||
|
Reference in New Issue
Block a user