Skip to content

Commit 3152c96

Browse files
committed
[py]: type hints for missing dunder __init__
1 parent ae57ced commit 3152c96

File tree

17 files changed

+20
-20
lines changed

17 files changed

+20
-20
lines changed

py/selenium/webdriver/chrome/webdriver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(
4646
chrome_options=None,
4747
service: Service = None,
4848
keep_alive=DEFAULT_KEEP_ALIVE,
49-
):
49+
) -> None:
5050
"""
5151
Creates a new instance of the chrome driver.
5252
Starts the service and then creates new instance of chrome driver.

py/selenium/webdriver/chromium/remote_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __init__(
2727
browser_name: str,
2828
keep_alive: bool = True,
2929
ignore_proxy: typing.Optional[bool] = False,
30-
):
30+
) -> None:
3131
super().__init__(remote_server_addr, keep_alive, ignore_proxy=ignore_proxy)
3232
self.browser_name = browser_name
3333
self._commands["launchApp"] = ("POST", "/session/$sessionId/chromium/launch_app")

py/selenium/webdriver/chromium/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(
4040
log_path: typing.Optional[str] = None,
4141
env: typing.Optional[typing.Mapping[str, str]] = None,
4242
start_error_message: typing.Optional[str] = None,
43-
):
43+
) -> None:
4444
self.service_args = service_args or []
4545
if log_path:
4646
self.service_args.append(f"--log-path={log_path}")

py/selenium/webdriver/chromium/webdriver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545
service_log_path=DEFAULT_SERVICE_LOG_PATH,
4646
service: Service = None,
4747
keep_alive=DEFAULT_KEEP_ALIVE,
48-
):
48+
) -> None:
4949
"""
5050
Creates a new WebDriver instance of the ChromiumDriver.
5151
Starts the service and then creates new WebDriver instance of ChromiumDriver.

py/selenium/webdriver/edge/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(
4343
log_path: typing.Optional[str] = None,
4444
service_args: typing.Optional[typing.List[str]] = None,
4545
env: typing.Optional[typing.Mapping[str, str]] = None,
46-
):
46+
) -> None:
4747
self.service_args = service_args or []
4848

4949
if verbose:

py/selenium/webdriver/edge/webdriver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def __init__(
4444
service_log_path=DEFAULT_SERVICE_LOG_PATH,
4545
service: Service = None,
4646
keep_alive=False,
47-
verbose=False,
48-
):
47+
verbose=False, # Todo: Why is this now unused?
48+
) -> None:
4949
"""
5050
Creates a new instance of the edge driver.
5151
Starts the service and then creates new instance of edge driver.

py/selenium/webdriver/firefox/remote_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class FirefoxRemoteConnection(RemoteConnection):
2323

2424
browser_name = DesiredCapabilities.FIREFOX["browserName"]
2525

26-
def __init__(self, remote_server_addr, keep_alive=True, ignore_proxy=False):
26+
def __init__(self, remote_server_addr, keep_alive=True, ignore_proxy=False) -> None:
2727
super().__init__(remote_server_addr, keep_alive, ignore_proxy=ignore_proxy)
2828

2929
self._commands["GET_CONTEXT"] = ("GET", "/session/$sessionId/moz/context")

py/selenium/webdriver/firefox/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(
4242
service_args: typing.Optional[typing.List[str]] = None,
4343
log_path: typing.Optional[str] = None,
4444
env: typing.Optional[typing.Mapping[str, str]] = None,
45-
):
45+
) -> None:
4646
# Todo: This is vastly inconsistent, requires a follow up to standardise.
4747
file = log_path or "geckodriver.log"
4848
log_file = open(file, "a+", encoding="utf-8")

py/selenium/webdriver/firefox/webdriver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def __init__(
5555
service=None,
5656
desired_capabilities=None,
5757
log_path=DEFAULT_LOG_PATH,
58-
keep_alive=True,
59-
):
58+
keep_alive=True, # Todo: Why is this now unused?
59+
) -> None:
6060
"""Starts a new local session of Firefox.
6161
6262
Based on the combination and specificity of the various keyword

py/selenium/webdriver/ie/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Options(ArgOptions):
4848
ATTACH_TO_EDGE_CHROME = "ie.edgechromium"
4949
EDGE_EXECUTABLE_PATH = "ie.edgepath"
5050

51-
def __init__(self):
51+
def __init__(self) -> None:
5252
super().__init__()
5353
self._options = {}
5454
self._additional = {}

0 commit comments

Comments
 (0)