1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-29 22:24:26 +00: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

@@ -61,9 +61,10 @@ async def test_scheduler_rapid_cancellation(
elif "Total executed:" in line:
if match := re.search(r"Total executed: (\d+)", line):
test_stats["final_executed"] = int(match.group(1))
elif "Implicit cancellations (replaced):" in line:
if match := re.search(r"Implicit cancellations \(replaced\): (\d+)", line):
test_stats["final_implicit_cancellations"] = int(match.group(1))
elif "Implicit cancellations (replaced):" in line and (
match := re.search(r"Implicit cancellations \(replaced\): (\d+)", line)
):
test_stats["final_implicit_cancellations"] = int(match.group(1))
# Check for crash indicators
if any(