From 354c9a08572694f5263b76d6501930dc511165f1 Mon Sep 17 00:00:00 2001 From: Benjamin Rosemann Date: Tue, 4 Feb 2025 13:41:12 +0100 Subject: [PATCH] Replace unused variable in lambda expression In Python it is common to indicate unused variables by choosing _ (underscore) as variable name. This commit replaces some instances of unused variables in lambda expressions to align with Python customs and also other test examples in the repository. --- examples/python/tests/waits/test_waits.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/python/tests/waits/test_waits.py b/examples/python/tests/waits/test_waits.py index b496a8bff6cd..aa3d773a6018 100644 --- a/examples/python/tests/waits/test_waits.py +++ b/examples/python/tests/waits/test_waits.py @@ -39,7 +39,7 @@ def test_explicit(driver): driver.find_element(By.ID, "reveal").click() wait = WebDriverWait(driver, timeout=2) - wait.until(lambda d : revealed.is_displayed()) + wait.until(lambda _ : revealed.is_displayed()) revealed.send_keys("Displayed") assert revealed.get_property("value") == "Displayed" @@ -52,6 +52,6 @@ def test_explicit_options(driver): errors = [NoSuchElementException, ElementNotInteractableException] wait = WebDriverWait(driver, timeout=2, poll_frequency=.2, ignored_exceptions=errors) - wait.until(lambda d : revealed.send_keys("Displayed") or True) + wait.until(lambda _ : revealed.send_keys("Displayed") or True) assert revealed.get_property("value") == "Displayed"