Skip to content

Commit 2e5c312

Browse files
committed
Revert "format.sh"
extra liting done This reverts commit 32214b6.
1 parent 32214b6 commit 2e5c312

File tree

9 files changed

+112
-114
lines changed

9 files changed

+112
-114
lines changed

py/generate.py

Lines changed: 81 additions & 78 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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ 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
26-
"""
25+
https://github.com/SeleniumHQ/selenium/wiki/PageObjects"""
2726
google = GoogleOneBox(driver, "http://www.google.com")
2827
res = google.search_for("cheese")
2928
assert res.link_contains_match_for("Wikipedia")

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

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

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

145146
@pytest.mark.xfail_safari
146147
def test_clicking_on_form_elements(driver, pages):
147-
"""Copied from
148-
org.openqa.selenium.interactions.CombinedInputActionsTest."""
148+
"""Copied from org.openqa.selenium.interactions.CombinedInputActionsTest."""
149149
pages.load("formSelectionPage.html")
150150
options = driver.find_elements(By.TAG_NAME, "option")
151151
selectThreeOptions = (
@@ -163,8 +163,7 @@ 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
167-
org.openqa.selenium.interactions.CombinedInputActionsTest."""
166+
"""Copied from org.openqa.selenium.interactions.CombinedInputActionsTest."""
168167
pages.load("selectableItems.html")
169168
reportingElement = driver.find_element(By.ID, "infodiv")
170169
assert "no info" == reportingElement.text
@@ -209,8 +208,10 @@ def test_sending_keys_to_element(driver, pages):
209208

210209

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

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

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

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

118119
@pytest.mark.xfail_safari
119120
def test_clicking_on_form_elements_with_pointer(driver, pages):
120-
"""Copied from
121-
org.openqa.selenium.interactions.CombinedInputActionsTest."""
121+
"""Copied from 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,8 +142,7 @@ 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
146-
org.openqa.selenium.interactions.CombinedInputActionsTest."""
145+
"""Copied from org.openqa.selenium.interactions.CombinedInputActionsTest."""
147146
pages.load("selectableItems.html")
148147
reportingElement = driver.find_element(By.ID, "infodiv")
149148
assert "no info" == reportingElement.text
@@ -195,8 +194,10 @@ def test_sending_keys_to_element_with_keyboard(driver, pages):
195194

196195

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

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@
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.
1917

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-
"""
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."""
2524

2625

2726
def require_loaded(func):

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
"""A simple web server for testing purpose.
1817

19-
It serves the testing html pages that are needed by the webdriver unit
20-
tests.
21-
"""
18+
"""A simple web server for testing purpose.
19+
It serves the testing html pages that are needed by the webdriver unit tests."""
2220
import contextlib
2321
import logging
2422
import os
@@ -121,7 +119,7 @@ def do_POST(self):
121119
self.send_error(500, f"Error found: {e}")
122120

123121
def log_message(self, format, *args):
124-
"""Override default to avoid trashing stderr."""
122+
"""Override default to avoid trashing stderr"""
125123
pass
126124

127125

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

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

2222

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

2726
class MyWebElement:
2827
def __init__(self, parent, id, _w3c=True):

scripts/update_cdp.py

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

1919

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

0 commit comments

Comments
 (0)