Skip to content

Commit 0039509

Browse files
committed
fixing format issues
1 parent de5b2e3 commit 0039509

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

py/selenium/webdriver/common/print_page_options.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,16 +410,18 @@ class PrintOptions:
410410

411411
def __init__(self) -> None:
412412
self._print_options: _PrintOpts = {}
413-
self._page: _PageOpts = {"height": PrintOptions.A4["height"], "width": PrintOptions.A4["width"]} # Default page size set to A4
413+
self._page: _PageOpts = {
414+
"height": PrintOptions.A4["height"],
415+
"width": PrintOptions.A4["width"],
416+
} # Default page size set to A4
414417
self._margin: _MarginOpts = {}
415418

416419
def to_dict(self) -> _PrintOpts:
417420
""":Returns: A hash of print options configured."""
418421
return self._print_options
419422

420423
def set_page_size(self, page_size: dict) -> None:
421-
"""
422-
Sets the page size to predefined or custom dimensions.
424+
"""Sets the page size to predefined or custom dimensions.
423425
424426
Parameters
425427
----------
@@ -430,15 +432,13 @@ def set_page_size(self, page_size: dict) -> None:
430432
-------
431433
self.set_page_size(PageSize.A4) # A4 predefined size
432434
self.set_page_size({"height": 15.0, "width": 20.0}) # Custom size in cm
433-
434435
"""
435436
self._validate_num_property("height", page_size["height"])
436437
self._validate_num_property("width", page_size["width"])
437438
self._page["height"] = page_size["height"]
438439
self._page["width"] = page_size["width"]
439440
self._print_options["page"] = self._page
440441

441-
442442
def _validate_num_property(self, property_name: str, value: float) -> None:
443443
"""Helper function to validate some of the properties."""
444444
if not isinstance(value, (int, float)):

py/test/unit/selenium/webdriver/common/print_page_options_tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def test_raises_exception_if_scale_is_outside_range(print_options):
4444
with pytest.raises(ValueError):
4545
print_options.scale = 3
4646

47+
4748
def test_set_page_size(print_options):
4849
# Example of setting a default (A4)
4950
assert print_options.page_width == PrintOptions.A4["width"]

0 commit comments

Comments
 (0)