Skip to content

Commit d7ca7e8

Browse files
committed
style: run ruff CI for code style
1 parent 80ea11f commit d7ca7e8

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

pydoll/browser/tab.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,11 @@ async def take_screenshot(
590590
output_extension = ScreenshotFormat.JPEG
591591

592592
# Normalize jpg to jpeg (CDP only accepts jpeg)
593-
output_extension = output_extension.replace('jpg', 'jpeg') if output_extension == 'jpg' else output_extension
593+
output_extension = (
594+
output_extension.replace('jpg', 'jpeg')
595+
if output_extension == 'jpg'
596+
else output_extension
597+
)
594598

595599
if not ScreenshotFormat.has_value(output_extension):
596600
raise InvalidFileExtension(f'{output_extension} extension is not supported.')
@@ -651,7 +655,7 @@ async def print_to_pdf(
651655
652656
Returns:
653657
Base64 PDF data if as_base64=True, None otherwise.
654-
658+
655659
Raises:
656660
ValueError: If path is not provided when as_base64=False.
657661
"""
@@ -674,7 +678,7 @@ async def print_to_pdf(
674678
return pdf_data
675679

676680
if path is None:
677-
raise ValueError("path is required when as_base64=False")
681+
raise ValueError('path is required when as_base64=False')
678682

679683
pdf_bytes = decode_base64_to_bytes(pdf_data)
680684
async with aiofiles.open(path, 'wb') as file:

pydoll/elements/web_element.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,7 @@ async def take_screenshot(
285285
)
286286

287287
screenshot: CaptureScreenshotResponse = await self._connection_handler.execute_command(
288-
PageCommands.capture_screenshot(
289-
format=file_format, clip=clip, quality=quality
290-
)
288+
PageCommands.capture_screenshot(format=file_format, clip=clip, quality=quality)
291289
)
292290

293291
screenshot_data = screenshot['result']['data']

0 commit comments

Comments
 (0)