Skip to content

Commit 32214b6

Browse files
committed
format.sh
1 parent 2261610 commit 32214b6

File tree

9 files changed

+114
-112
lines changed

9 files changed

+114
-112
lines changed

py/generate.py

Lines changed: 78 additions & 81 deletions
Large diffs are not rendered by default.

py/selenium/webdriver/support/wait.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def __repr__(self):
9090
return f'<{type(self).__module__}.{type(self).__name__} (session="{self._driver.session_id}")>'
9191

9292
def until(self, method: Callable[[D], Union[Literal[False], T]], message: str = "") -> T:
93-
"""Wait until the method returns a value that is not False
94-
93+
"""Wait until the method returns a value that is not False.
94+
9595
Calls the method provided with the driver as an argument until the
9696
return value does not evaluate to ``False``.
9797
@@ -141,8 +141,8 @@ def until(self, method: Callable[[D], Union[Literal[False], T]], message: str =
141141
raise TimeoutException(message, screen, stacktrace)
142142

143143
def until_not(self, method: Callable[[D], T], message: str = "") -> Union[T, Literal[True]]:
144-
"""Wait until the method returns a value that is not False
145-
144+
"""Wait until the method returns a value that is not False.
145+
146146
Calls the method provided with the driver as an argument until the
147147
return value does not evaluate to ``False``.
148148

py/test/selenium/webdriver/common/example2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ def test_search(driver):
2222
"""This example shows how to use the page object pattern.
2323
2424
For more information about this pattern, see:
25-
https://github.com/SeleniumHQ/selenium/wiki/PageObjects"""
25+
https://github.com/SeleniumHQ/selenium/wiki/PageObjects
26+
"""
2627
google = GoogleOneBox(driver, "http://www.google.com")
2728
res = google.search_for("cheese")
2829
assert res.link_contains_match_for("Wikipedia")

py/test/selenium/webdriver/common/interactions_tests.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
1817
"""Tests for advanced user interactions."""
1918
import pytest
2019

@@ -145,7 +144,8 @@ def test_cannot_move_to_anull_locator(driver, pages):
145144

146145
@pytest.mark.xfail_safari
147146
def test_clicking_on_form_elements(driver, pages):
148-
"""Copied from org.openqa.selenium.interactions.CombinedInputActionsTest."""
147+
"""Copied from
148+
org.openqa.selenium.interactions.CombinedInputActionsTest."""
149149
pages.load("formSelectionPage.html")
150150
options = driver.find_elements(By.TAG_NAME, "option")
151151
selectThreeOptions = (
@@ -163,7 +163,8 @@ def test_clicking_on_form_elements(driver, pages):
163163
@pytest.mark.xfail_firefox
164164
@pytest.mark.xfail_safari
165165
def test_selecting_multiple_items(driver, pages):
166-
"""Copied from org.openqa.selenium.interactions.CombinedInputActionsTest."""
166+
"""Copied from
167+
org.openqa.selenium.interactions.CombinedInputActionsTest."""
167168
pages.load("selectableItems.html")
168169
reportingElement = driver.find_element(By.ID, "infodiv")
169170
assert "no info" == reportingElement.text
@@ -208,10 +209,8 @@ def test_sending_keys_to_element(driver, pages):
208209

209210

210211
def test_can_send_keys_between_clicks(driver, pages):
211-
"""
212-
For W3C, ensures that the correct number of pauses are given to the other
213-
input device.
214-
"""
212+
"""For W3C, ensures that the correct number of pauses are given to the
213+
other input device."""
215214
pages.load("javascriptPage.html")
216215
keyup = driver.find_element(By.ID, "keyUp")
217216
keydown = driver.find_element(By.ID, "keyDown")

py/test/selenium/webdriver/common/interactions_with_device_tests.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
1817
"""Tests for advanced user interactions."""
1918
import pytest
2019

@@ -118,7 +117,8 @@ def test_cannot_move_to_anull_locator_with_pointer(driver, pages):
118117

119118
@pytest.mark.xfail_safari
120119
def test_clicking_on_form_elements_with_pointer(driver, pages):
121-
"""Copied from org.openqa.selenium.interactions.CombinedInputActionsTest."""
120+
"""Copied from
121+
org.openqa.selenium.interactions.CombinedInputActionsTest."""
122122
pages.load("formSelectionPage.html")
123123
options = driver.find_elements(By.TAG_NAME, "option")
124124
mouse = PointerInput(interaction.POINTER_MOUSE, "test mouse")
@@ -142,7 +142,8 @@ def test_clicking_on_form_elements_with_pointer(driver, pages):
142142
@pytest.mark.xfail_firefox
143143
@pytest.mark.xfail_safari
144144
def test_selecting_multiple_items_with_devices(driver, pages):
145-
"""Copied from org.openqa.selenium.interactions.CombinedInputActionsTest."""
145+
"""Copied from
146+
org.openqa.selenium.interactions.CombinedInputActionsTest."""
146147
pages.load("selectableItems.html")
147148
reportingElement = driver.find_element(By.ID, "infodiv")
148149
assert "no info" == reportingElement.text
@@ -194,10 +195,8 @@ def test_sending_keys_to_element_with_keyboard(driver, pages):
194195

195196

196197
def test_can_send_keys_between_clicks_with_keyboard(driver, pages):
197-
"""
198-
For W3C, ensures that the correct number of pauses are given to the other
199-
input device.
200-
"""
198+
"""For W3C, ensures that the correct number of pauses are given to the
199+
other input device."""
201200
pages.load("javascriptPage.html")
202201
keyup = driver.find_element(By.ID, "keyUp")
203202
keydown = driver.find_element(By.ID, "keyDown")

py/test/selenium/webdriver/common/page_loader.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
"""This module contains some decorators that can be used to support the page
18+
models.
1719
18-
"""This module contains some decorators that can be used to support
19-
the page models. For example for an action that needs a page to be fully
20-
loaded, the @require_loaded decorator will make sure the page is loaded
21-
before the call is invoked.
22-
This pattern is also useful for waiting for certain asynchronous events
23-
to happen before executing certain actions."""
20+
For example for an action that needs a page to be fully loaded, the
21+
@require_loaded decorator will make sure the page is loaded before the
22+
call is invoked. This pattern is also useful for waiting for certain
23+
asynchronous events to happen before executing certain actions.
24+
"""
2425

2526

2627
def require_loaded(func):

py/test/selenium/webdriver/common/webserver.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
1817
"""A simple web server for testing purpose.
19-
It serves the testing html pages that are needed by the webdriver unit tests."""
18+
19+
It serves the testing html pages that are needed by the webdriver unit
20+
tests.
21+
"""
2022
import contextlib
2123
import logging
2224
import os
@@ -119,7 +121,7 @@ def do_POST(self):
119121
self.send_error(500, f"Error found: {e}")
120122

121123
def log_message(self, format, *args):
122-
"""Override default to avoid trashing stderr"""
124+
"""Override default to avoid trashing stderr."""
123125
pass
124126

125127

py/test/unit/selenium/webdriver/remote/subtyping_tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222

2323
def test_web_element_not_subclassed():
24-
"""A registered subtype of WebElement should work with isinstance checks."""
24+
"""A registered subtype of WebElement should work with isinstance
25+
checks."""
2526

2627
class MyWebElement:
2728
def __init__(self, parent, id, _w3c=True):

scripts/update_cdp.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818

1919

2020
def get_chrome_milestone():
21-
"""This is the same method from pinned_browser. Use --chrome_channel=Beta if
22-
using early stable release."""
21+
"""This is the same method from pinned_browser.
22+
23+
Use --chrome_channel=Beta if using early stable release.
24+
"""
2325
parser = argparse.ArgumentParser()
2426
parser.add_argument("--chrome_channel", default="Stable", help="Set the Chrome channel")
2527
args = parser.parse_args()

0 commit comments

Comments
 (0)