From 5727043cec9f6c84a24faf6d83a870ad9ae42c14 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 15 Nov 2025 10:24:38 -0600 Subject: [PATCH] preen --- tests/unit_tests/test_lambda_dedup.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/unit_tests/test_lambda_dedup.py b/tests/unit_tests/test_lambda_dedup.py index 0c8925b5ea..ec4c0d29c9 100644 --- a/tests/unit_tests/test_lambda_dedup.py +++ b/tests/unit_tests/test_lambda_dedup.py @@ -4,7 +4,7 @@ from esphome import cpp_generator as cg from esphome.core import CORE -def test_deduplicate_identical_lambdas(): +def test_deduplicate_identical_lambdas() -> None: """Test that identical stateless lambdas are deduplicated.""" # Create two identical lambda expressions lambda1 = cg.LambdaExpression( @@ -30,7 +30,7 @@ def test_deduplicate_identical_lambdas(): assert func_name1 == "shared_lambda_0" -def test_different_lambdas_not_deduplicated(): +def test_different_lambdas_not_deduplicated() -> None: """Test that different lambdas get different function names.""" lambda1 = cg.LambdaExpression( parts=["return 42;"], @@ -55,7 +55,7 @@ def test_different_lambdas_not_deduplicated(): assert func_name2 == "shared_lambda_1" -def test_different_return_types_not_deduplicated(): +def test_different_return_types_not_deduplicated() -> None: """Test that lambdas with different return types are not deduplicated.""" lambda1 = cg.LambdaExpression( parts=["return 42;"], @@ -78,7 +78,7 @@ def test_different_return_types_not_deduplicated(): assert func_name1 != func_name2 -def test_different_parameters_not_deduplicated(): +def test_different_parameters_not_deduplicated() -> None: """Test that lambdas with different parameters are not deduplicated.""" lambda1 = cg.LambdaExpression( parts=["return x;"], @@ -101,7 +101,7 @@ def test_different_parameters_not_deduplicated(): assert func_name1 != func_name2 -def test_flush_lambda_dedup_declarations(): +def test_flush_lambda_dedup_declarations() -> None: """Test that deferred declarations are properly stored for later flushing.""" # Create a lambda which will create a deferred declaration lambda1 = cg.LambdaExpression( @@ -126,7 +126,7 @@ def test_flush_lambda_dedup_declarations(): # during real code generation, so we don't test that here -def test_shared_function_lambda_expression(): +def test_shared_function_lambda_expression() -> None: """Test SharedFunctionLambdaExpression behaves correctly.""" shared_lambda = cg.SharedFunctionLambdaExpression( func_name="shared_lambda_0", @@ -144,7 +144,7 @@ def test_shared_function_lambda_expression(): assert shared_lambda.content == "" -def test_lambda_deduplication_counter(): +def test_lambda_deduplication_counter() -> None: """Test that lambda counter increments correctly.""" # Create 3 different lambdas for i in range(3): @@ -158,7 +158,7 @@ def test_lambda_deduplication_counter(): assert func_name == f"shared_lambda_{i}" -def test_lambda_format_body(): +def test_lambda_format_body() -> None: """Test that format_body correctly formats lambda body with source.""" # Without source lambda1 = cg.LambdaExpression(