Skip to content

Commit cf11d73

Browse files
authored
Merge branch 'trunk' into timezone
2 parents 38caa7c + 4428c25 commit cf11d73

File tree

13 files changed

+227
-272
lines changed

13 files changed

+227
-272
lines changed

py/pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ target-version = "py39"
146146
[tool.ruff.lint]
147147
extend-select = ["D", "E4", "E7", "E9", "F", "I", "E501", "RUF022", "TID252"]
148148
fixable = ["ALL"]
149-
# remove these as we cleanup docstrings
150149
extend-ignore = [
151150
"D100", # Missing docstring in public module
152151
"D101", # Missing docstring in public class
@@ -157,8 +156,6 @@ extend-ignore = [
157156
"D107", # Missing docstring in `__init__`
158157
"D205", # 1 blank line required between summary line and description
159158
"D212", # Multi-line docstring summary should start at the first line
160-
"D415", # First line should end with a period, question mark, or exclamation point
161-
"D417", # Missing argument descriptions in the docstring for `__init__`
162159
]
163160

164161
[tool.ruff.format]

py/selenium/webdriver/chromium/webdriver.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def set_network_conditions(self, **network_conditions) -> None:
105105
upload_throughput=500 * 1024,
106106
) # maximal throughput
107107
108-
Note: 'throughput' can be used to set both (for download and upload).
108+
Note: `throughput` can be used to set both (for download and upload).
109109
"""
110110
self.execute("setNetworkConditions", {"network_conditions": network_conditions})
111111

@@ -126,17 +126,19 @@ def set_permissions(self, name: str, value: str) -> None:
126126
self.execute("setPermissions", {"descriptor": {"name": name}, "state": value})
127127

128128
def execute_cdp_cmd(self, cmd: str, cmd_args: dict):
129-
"""Execute Chrome Devtools Protocol command and get returned result The
130-
command and command args should follow chrome devtools protocol
131-
domains/commands, refer to link
132-
https://chromedevtools.github.io/devtools-protocol/
129+
"""Execute Chrome Devtools Protocol command and get returned result.
130+
131+
The command and command args should follow chrome devtools protocol domains/commands
132+
133+
See:
134+
- https://chromedevtools.github.io/devtools-protocol/
133135
134136
Args:
135137
cmd: A str, command name
136138
cmd_args: A dict, command args. empty dict {} if there is no command args
137139
138140
Example:
139-
driver.execute_cdp_cmd('Network.getResponseBody', {'requestId': requestId})
141+
`driver.execute_cdp_cmd('Network.getResponseBody', {'requestId': requestId})`
140142
141143
Returns:
142144
A dict, empty dict {} if there is no result to return.

py/selenium/webdriver/common/action_chains.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ def __init__(self, driver: WebDriver, duration: int = 250, devices: list[AnyDevi
7272
Args:
7373
driver: The WebDriver instance which performs user actions.
7474
duration: override the default 250 msecs of DEFAULT_MOVE_DURATION in PointerInput
75+
devices: Optional list of input devices (PointerInput, KeyInput, WheelInput) to use.
76+
If not provided, default devices will be created.
7577
"""
7678
self._driver = driver
7779
mouse = None

py/selenium/webdriver/common/actions/pointer_actions.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@
2525

2626
class PointerActions(Interaction):
2727
def __init__(self, source: Optional[PointerInput] = None, duration: int = 250):
28-
"""
28+
"""Initialize a new PointerActions instance.
29+
2930
Args:
30-
- source: PointerInput instance
31-
- duration: override the default 250 msecs of DEFAULT_MOVE_DURATION in source
31+
source: Optional PointerInput instance. If not provided, a default
32+
mouse PointerInput will be created.
33+
duration: Override the default 250 msecs of DEFAULT_MOVE_DURATION
34+
in the source.
3235
"""
3336
if source is None:
3437
source = PointerInput(interaction.POINTER_MOUSE, "mouse")

py/selenium/webdriver/common/options.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ def __set__(self, obj, value):
6565

6666

6767
class _PageLoadStrategyDescriptor:
68-
"""Determines the point at which a navigation command is returned:
69-
https://w3c.github.io/webdriver/#dfn-table-of-page-load-strategies.
68+
"""Determines the point at which a navigation command is returned.
69+
70+
See:
71+
- https://w3c.github.io/webdriver/#dfn-table-of-page-load-strategies.
7072
7173
Args:
7274
strategy: the strategy corresponding to a document readiness state
@@ -86,9 +88,10 @@ def __set__(self, obj, value):
8688

8789

8890
class _UnHandledPromptBehaviorDescriptor:
89-
"""How the driver should respond when an alert is present and the:
90-
command sent is not handling the alert:
91-
https://w3c.github.io/webdriver/#dfn-table-of-page-load-strategies:
91+
"""How the driver should respond when an alert is present and the command sent is not handling the alert.
92+
93+
See:
94+
- https://w3c.github.io/webdriver/#dfn-table-of-page-load-strategies:
9295
9396
Args:
9497
behavior: behavior to use when an alert is encountered
@@ -114,8 +117,10 @@ def __set__(self, obj, value):
114117

115118

116119
class _TimeoutsDescriptor:
117-
"""How long the driver should wait for actions to complete before:
118-
returning an error https://w3c.github.io/webdriver/#timeouts:
120+
"""How long the driver should wait for actions to complete before returning an error.
121+
122+
See:
123+
- https://w3c.github.io/webdriver/#timeouts
119124
120125
Args:
121126
timeouts: values in milliseconds for implicit wait, page load and script timeout

py/selenium/webdriver/ie/service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def __init__(
4848
log_output: (Optional) int representation of STDOUT/DEVNULL, any IO instance or String path to file.
4949
Default is "stdout".
5050
driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable.
51+
**kwargs: Additional keyword arguments to pass to the parent Service class.
5152
"""
5253
self._service_args = list(service_args or [])
5354
driver_path_env_key = driver_path_env_key or "SE_IEDRIVER"

py/selenium/webdriver/remote/shadowroot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def find_element(self, by: str = By.ID, value: str = None):
5959
- By.LINK_TEXT: Locate a link element by its exact text.
6060
- By.PARTIAL_LINK_TEXT: Locate a link element by partial text match.
6161
- RelativeBy: Locate elements relative to a specified root element.
62+
value: The locator value to use with the specified `by` strategy.
6263
6364
Returns:
6465
The first matching `WebElement` found on the page.
@@ -94,6 +95,7 @@ def find_elements(self, by: str = By.ID, value: str = None) -> list:
9495
- By.LINK_TEXT: Locate a link element by its exact text.
9596
- By.PARTIAL_LINK_TEXT: Locate a link element by partial text match.
9697
- RelativeBy: Locate elements relative to a specified root element.
98+
value: The locator value to use with the specified `by` strategy.
9799
98100
Returns:
99101
List of `WebElements` matching locator strategy found on the page.

0 commit comments

Comments
 (0)