Skip to content

Commit 1d2ea04

Browse files
committed
[py]: Additional types; remove unused permissions.py
1 parent 7ead8b8 commit 1d2ea04

File tree

5 files changed

+3
-37
lines changed

5 files changed

+3
-37
lines changed

py/docs/source/api.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ Webdriver.safari
149149
:toctree: webdriver_safari
150150

151151
selenium.webdriver.safari.options
152-
selenium.webdriver.safari.permissions
153152
selenium.webdriver.safari.remote_connection
154153
selenium.webdriver.safari.service
155154
selenium.webdriver.safari.webdriver

py/docs/source/webdriver_safari/selenium.webdriver.safari.permissions.rst

Lines changed: 0 additions & 29 deletions
This file was deleted.

py/selenium/webdriver/remote/remote_connection.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import platform
2121
import socket
2222
import string
23-
import typing
2423
from base64 import b64encode
2524
from urllib import parse
2625

@@ -156,7 +155,7 @@ def _get_connection_manager(self):
156155

157156
return urllib3.PoolManager(**pool_manager_init_args)
158157

159-
def __init__(self, remote_server_addr, keep_alive=False, ignore_proxy: typing.Optional[bool] = False):
158+
def __init__(self, remote_server_addr: str, keep_alive: bool = False, ignore_proxy: bool = False):
160159
self.keep_alive = keep_alive
161160
self._url = remote_server_addr
162161

py/selenium/webdriver/safari/remote_connection.py

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

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

26-
def __init__(self, remote_server_addr, keep_alive=True, ignore_proxy=False):
26+
def __init__(self, remote_server_addr: str, keep_alive: bool = True, ignore_proxy: bool = False):
2727
super().__init__(remote_server_addr, keep_alive, ignore_proxy=ignore_proxy)
2828
self._commands["GET_PERMISSIONS"] = ("GET", "/session/$sessionId/apple/permissions")
2929
self._commands["SET_PERMISSIONS"] = ("POST", "/session/$sessionId/apple/permissions")

py/selenium/webdriver/safari/webdriver.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,7 @@ def __init__(
105105
)
106106

107107
self._reuse_service = reuse_service
108-
if service:
109-
self.service = service
110-
else:
111-
self.service = Service(executable_path, port=port, quiet=quiet, service_args=service_args)
108+
self.service = service or Service(executable_path, port=port, quiet=quiet, service_args=service_args)
112109
if not reuse_service:
113110
self.service.start()
114111

0 commit comments

Comments
 (0)