From 46b04b0a4a8c98f0abf8fbb3258baeb0e63a19ad Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Wed, 19 Jun 2024 15:34:55 +0100 Subject: [PATCH] Fix remaining (new) ruff lints --- tests/recipe/test_recipe.py | 6 ++---- tests/transport/test_common.py | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/recipe/test_recipe.py b/tests/recipe/test_recipe.py index c27eb8f2..b73aad37 100644 --- a/tests/recipe/test_recipe.py +++ b/tests/recipe/test_recipe.py @@ -363,8 +363,6 @@ def test_merging_recipes(): # There is a 'C service' assert any( - map( - lambda x: (isinstance(x, dict) and x.get("service") == "C service"), - C.recipe.values(), - ) + isinstance(x, dict) and x.get("service") == "C service" + for x in C.recipe.values() ) diff --git a/tests/transport/test_common.py b/tests/transport/test_common.py index c30710cd..2ac337c3 100644 --- a/tests/transport/test_common.py +++ b/tests/transport/test_common.py @@ -167,7 +167,9 @@ def test_callbacks_can_be_intercepted(mangling): ) # Pass through (tests the value passed to the interceptor function is sensible) - intercept = lambda x: x + def intercept(x): + return x + ct.subscription_callback_set_intercept(intercept) ct.subscription_callback(subid)(mock.sentinel.header, mock.sentinel.message)