From 66e1f8dfb103513532ce467f84d047c8fc0449e1 Mon Sep 17 00:00:00 2001 From: clydebarrow <2366188+clydebarrow@users.noreply.github.com> Date: Mon, 13 May 2024 11:17:22 +1000 Subject: [PATCH] Use Optional --- esphome/cpp_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/cpp_generator.py b/esphome/cpp_generator.py index 0e711f64e1..e2dbbf3d43 100644 --- a/esphome/cpp_generator.py +++ b/esphome/cpp_generator.py @@ -654,7 +654,7 @@ async def process_lambda( parameters: list[tuple[SafeExpType, str]], capture: str = "=", return_type: SafeExpType = None, -) -> LambdaExpression | None: +) -> Optional[LambdaExpression]: """Process the given lambda value into a LambdaExpression. This is a coroutine because lambdas can depend on other IDs,