From 063063eae0fae003c55f77e8da1aefbc47bb656f Mon Sep 17 00:00:00 2001 From: Katherine Whitlock Date: Tue, 18 Feb 2025 23:10:21 -0500 Subject: [PATCH] Format cpp_generator.py --- .github/workflows/ci.yml | 2 +- esphome/cpp_generator.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b6a6b9941..7dbaf0c432 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,7 +77,7 @@ jobs: - name: Run Ruff run: | . venv/bin/activate - ruff format --verbose esphome tests + ruff format --diff esphome tests - name: Suggested changes run: script/ci-suggest-changes if: always() diff --git a/esphome/cpp_generator.py b/esphome/cpp_generator.py index 4e283868e1..eb0bd25d1d 100644 --- a/esphome/cpp_generator.py +++ b/esphome/cpp_generator.py @@ -506,9 +506,9 @@ def with_local_variable(id_: ID, rhs: SafeExpType, callback: Callable, *args) -> """ # throw if the callback is async: - assert not inspect.iscoroutinefunction( - callback - ), "with_local_variable() callback cannot be async!" + assert not inspect.iscoroutinefunction(callback), ( + "with_local_variable() callback cannot be async!" + ) CORE.add(RawStatement("{")) # output opening curly brace obj = variable(id_, rhs, None, True)