Skip to content

Commit 0704515

Browse files
committed
Refactor docstrings in BiDi classes for consistency and clarity
1 parent 2077189 commit 0704515

File tree

7 files changed

+21
-19
lines changed

7 files changed

+21
-19
lines changed

py/selenium/webdriver/common/bidi/browser.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,7 @@ def from_dict(cls, data: dict) -> "ClientWindowInfo":
169169

170170

171171
class Browser:
172-
"""
173-
BiDi implementation of the browser module.
174-
"""
172+
"""BiDi implementation of the browser module."""
175173

176174
def __init__(self, conn):
177175
self.conn = conn

py/selenium/webdriver/common/bidi/input.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,7 @@ def from_json(cls, json):
378378

379379

380380
class Input:
381-
"""
382-
BiDi implementation of the input module.
383-
"""
381+
"""BiDi implementation of the input module."""
384382

385383
def __init__(self, conn):
386384
self.conn = conn

py/selenium/webdriver/common/bidi/permissions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ def to_dict(self) -> dict:
3939

4040

4141
class Permissions:
42-
"""
43-
BiDi implementation of the permissions module.
44-
"""
42+
"""BiDi implementation of the permissions module."""
4543

4644
def __init__(self, conn):
4745
self.conn = conn

py/selenium/webdriver/common/bidi/script.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,7 @@ def execute(self, script: str, *args) -> dict:
312312
raise WebDriverException(error_message)
313313

314314
def __convert_to_local_value(self, value) -> dict:
315-
"""
316-
Converts a Python value to BiDi LocalValue format.
317-
"""
315+
"""Converts a Python value to BiDi LocalValue format."""
318316
if value is None:
319317
return {"type": "null"}
320318
elif isinstance(value, bool):

py/selenium/webdriver/common/bidi/webextension.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222

2323

2424
class WebExtension:
25-
"""
26-
BiDi implementation of the webExtension module.
27-
"""
25+
"""BiDi implementation of the webExtension module."""
2826

2927
def __init__(self, conn):
3028
self.conn = conn

py/selenium/webdriver/common/print_page_options.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,10 @@ def __init__(self) -> None:
335335
self._margin: _MarginOpts = {}
336336

337337
def to_dict(self) -> _PrintOpts:
338-
""":Returns: A hash of print options configured."""
338+
"""
339+
Returns:
340+
A hash of print options configured.
341+
"""
339342
return self._print_options
340343

341344
def set_page_size(self, page_size: dict) -> None:

py/selenium/webdriver/firefox/options.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ def binary(self, new_binary: Union[str, FirefoxBinary]) -> None:
6464

6565
@property
6666
def binary_location(self) -> str:
67-
""":Returns: The location of the binary."""
67+
"""
68+
Returns:
69+
The location of the binary.
70+
"""
6871
return self._binary_location
6972

7073
@binary_location.setter # noqa
@@ -76,7 +79,10 @@ def binary_location(self, value: str) -> None:
7679

7780
@property
7881
def preferences(self) -> dict:
79-
""":Returns: A dict of preferences."""
82+
"""
83+
Returns:
84+
A dict of preferences.
85+
"""
8086
return self._preferences
8187

8288
def set_preference(self, name: str, value: Union[str, int, bool]):
@@ -85,7 +91,10 @@ def set_preference(self, name: str, value: Union[str, int, bool]):
8591

8692
@property
8793
def profile(self) -> Optional[FirefoxProfile]:
88-
""":Returns: The Firefox profile to use."""
94+
"""
95+
Returns:
96+
The Firefox profile to use.
97+
"""
8998
return self._profile
9099

91100
@profile.setter

0 commit comments

Comments
 (0)