Skip to content

Commit f44a9ac

Browse files
committed
prettyfy docstrings in ChromiumOptions, Edge Options, and Service classes for clarity and consistency
1 parent ef65523 commit f44a9ac

File tree

3 files changed

+25
-17
lines changed

3 files changed

+25
-17
lines changed

py/selenium/webdriver/chromium/options.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ def __init__(self) -> None:
3838

3939
@property
4040
def binary_location(self) -> str:
41-
"""Returns:
42-
The location of the binary, otherwise an empty string.
41+
"""
42+
Returns:
43+
The location of the binary, otherwise an empty string.
4344
"""
4445
return self._binary_location
4546

@@ -56,8 +57,9 @@ def binary_location(self, value: str) -> None:
5657

5758
@property
5859
def debugger_address(self) -> Optional[str]:
59-
"""Returns:
60-
The address of the remote devtools instance.
60+
"""
61+
Returns:
62+
The address of the remote devtools instance.
6163
"""
6264
return self._debugger_address
6365

@@ -75,8 +77,9 @@ def debugger_address(self, value: str) -> None:
7577

7678
@property
7779
def extensions(self) -> list[str]:
78-
"""Returns:
79-
A list of encoded extensions that will be loaded.
80+
"""
81+
Returns:
82+
A list of encoded extensions that will be loaded.
8083
"""
8184

8285
def _decode(file_data: BinaryIO) -> str:
@@ -122,8 +125,9 @@ def add_encoded_extension(self, extension: str) -> None:
122125

123126
@property
124127
def experimental_options(self) -> dict:
125-
"""Returns:
126-
A dictionary of experimental options for chromium.
128+
"""
129+
Returns:
130+
A dictionary of experimental options for chromium.
127131
"""
128132
return self._experimental_options
129133

@@ -138,9 +142,10 @@ def add_experimental_option(self, name: str, value: Union[str, int, dict, list[s
138142

139143
@property
140144
def enable_webextensions(self) -> bool:
141-
"""Returns:
142-
Whether webextension support is enabled for Chromium-based browsers.
143-
True if webextension support is enabled, False otherwise.
145+
"""
146+
Returns:
147+
Whether webextension support is enabled for Chromium-based browsers.
148+
True if webextension support is enabled, False otherwise.
144149
"""
145150
return self._enable_webextensions
146151

py/selenium/webdriver/edge/options.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ def __init__(self) -> None:
2929

3030
@property
3131
def use_webview(self) -> bool:
32-
"""Returns:
33-
Whether WebView2 is enabled for Edge browser.
32+
"""
33+
Returns:
34+
Whether WebView2 is enabled for Edge browser.
3435
"""
3536
return self._use_webview
3637

@@ -57,7 +58,8 @@ def to_capabilities(self) -> dict:
5758

5859
@property
5960
def default_capabilities(self) -> dict:
60-
"""Returns:
61-
The default capabilities for Edge browser.
61+
"""
62+
Returns:
63+
The default capabilities for Edge browser.
6264
"""
6365
return DesiredCapabilities.EDGE.copy()

py/selenium/webdriver/edge/service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ def __init__(
6161

6262
@property
6363
def service_args(self) -> Sequence[str]:
64-
"""Returns:
65-
The sequence of service arguments.
64+
"""
65+
Returns:
66+
The sequence of service arguments.
6667
"""
6768
return self._service_args
6869

0 commit comments

Comments
 (0)