Skip to content

Commit 68f395f

Browse files
committed
style: refactor code for readability and consistency in style
1 parent fdf17b2 commit 68f395f

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

pydoll/browser/chromium/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ async def new_tab(self, url: str = '', browser_context_id: Optional[str] = None)
214214
)
215215
target_id = response['result']['targetId']
216216
tab = Tab(self, self._connection_port, target_id, browser_context_id)
217-
if url: await tab.go_to(url)
217+
if url:
218+
await tab.go_to(url)
218219
return tab
219220

220221
async def get_targets(self) -> list[TargetInfo]:

pydoll/browser/options.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def browser_preferences(self) -> dict:
106106
@browser_preferences.setter
107107
def browser_preferences(self, preferences: dict):
108108
if not isinstance(preferences, dict):
109-
raise ValueError("The experimental options value must be a dict.")
109+
raise ValueError('The experimental options value must be a dict.')
110110

111111
if preferences.get('prefs'):
112112
raise WrongPrefsDict
@@ -245,9 +245,11 @@ def block_notifications(self, block: bool):
245245
@property
246246
def allow_automatic_downloads(self) -> bool:
247247
return (
248-
self._get_pref_path(
249-
['profile', 'default_content_setting_values', 'automatic_downloads']
250-
)
248+
self._get_pref_path([
249+
'profile',
250+
'default_content_setting_values',
251+
'automatic_downloads',
252+
])
251253
== 1
252254
)
253255

pydoll/elements/mixins/find_elements_mixin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import asyncio
2-
from typing import TYPE_CHECKING, Literal, Optional, TypeVar, Union, overload
2+
from typing import TYPE_CHECKING, Literal, Optional, Union, overload
33

44
from pydoll.commands import (
55
DomCommands,
@@ -43,6 +43,7 @@ class FindElementsMixin:
4343
Classes using this mixin gain powerful element discovery without implementing
4444
complex location logic themselves.
4545
"""
46+
4647
@overload
4748
async def find(
4849
self,

0 commit comments

Comments
 (0)