mirror of
https://github.com/esphome/esphome.git
synced 2025-03-15 07:08:20 +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
|
- name: Run Ruff
|
||||||
run: |
|
run: |
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
ruff format --verbose esphome tests
|
ruff format --diff esphome tests
|
||||||
- name: Suggested changes
|
- name: Suggested changes
|
||||||
run: script/ci-suggest-changes
|
run: script/ci-suggest-changes
|
||||||
if: always()
|
if: always()
|
||||||
|
@ -506,9 +506,9 @@ def with_local_variable(id_: ID, rhs: SafeExpType, callback: Callable, *args) ->
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# throw if the callback is async:
|
# throw if the callback is async:
|
||||||
assert not inspect.iscoroutinefunction(
|
assert not inspect.iscoroutinefunction(callback), (
|
||||||
callback
|
"with_local_variable() callback cannot be async!"
|
||||||
), "with_local_variable() callback cannot be async!"
|
)
|
||||||
|
|
||||||
CORE.add(RawStatement("{")) # output opening curly brace
|
CORE.add(RawStatement("{")) # output opening curly brace
|
||||||
obj = variable(id_, rhs, None, True)
|
obj = variable(id_, rhs, None, True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user