mirror of
https://github.com/esphome/esphome.git
synced 2025-03-14 06:38:17 +00:00
Format cpp_generator.py
This commit is contained in:
parent
88e2c0e603
commit
063063eae0
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -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()
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user