From 76e1e7001a5c608a28185fadda809070aae45b83 Mon Sep 17 00:00:00 2001 From: pdmurray Date: Wed, 10 Jul 2024 15:19:26 -0700 Subject: [PATCH] [Tune] Replace lambda default arguments Signed-off-by: pdmurray --- python/ray/tune/tests/test_trial_scheduler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/ray/tune/tests/test_trial_scheduler.py b/python/ray/tune/tests/test_trial_scheduler.py index caaf3da2154c..60ff53decc44 100644 --- a/python/ray/tune/tests/test_trial_scheduler.py +++ b/python/ray/tune/tests/test_trial_scheduler.py @@ -1372,9 +1372,10 @@ def assertProduces(fn, values): seen.add(fn()["v"]) self.assertEqual(seen, values) - def explore_fn( - config, mutations, resample_probability, custom_explore_fn=lambda x: x - ): + def explore_fn(config, mutations, resample_probability, custom_explore_fn=None): + if custom_explore_fn is None: + custom_explore_fn = lambda x: x # noqa: E731 + new_config, _ = _explore( config, mutations,