File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff 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' ]
You can’t perform that action at this time.
0 commit comments