Skip to content

Commit 354c9a0

Browse files
committed
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.
1 parent b40a1f8 commit 354c9a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/python/tests/waits/test_waits.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_explicit(driver):
3939
driver.find_element(By.ID, "reveal").click()
4040

4141
wait = WebDriverWait(driver, timeout=2)
42-
wait.until(lambda d : revealed.is_displayed())
42+
wait.until(lambda _ : revealed.is_displayed())
4343

4444
revealed.send_keys("Displayed")
4545
assert revealed.get_property("value") == "Displayed"
@@ -52,6 +52,6 @@ def test_explicit_options(driver):
5252

5353
errors = [NoSuchElementException, ElementNotInteractableException]
5454
wait = WebDriverWait(driver, timeout=2, poll_frequency=.2, ignored_exceptions=errors)
55-
wait.until(lambda d : revealed.send_keys("Displayed") or True)
55+
wait.until(lambda _ : revealed.send_keys("Displayed") or True)
5656

5757
assert revealed.get_property("value") == "Displayed"

0 commit comments

Comments
 (0)