Skip to content

Commit

Permalink
[py]: Additional types; remove unused permissions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
symonk committed Oct 3, 2022
1 parent 7ead8b8 commit 1d2ea04
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 37 deletions.
1 change: 0 additions & 1 deletion py/docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ Webdriver.safari
:toctree: webdriver_safari

selenium.webdriver.safari.options
selenium.webdriver.safari.permissions
selenium.webdriver.safari.remote_connection
selenium.webdriver.safari.service
selenium.webdriver.safari.webdriver
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions py/selenium/webdriver/remote/remote_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import platform
import socket
import string
import typing
from base64 import b64encode
from urllib import parse

Expand Down Expand Up @@ -156,7 +155,7 @@ def _get_connection_manager(self):

return urllib3.PoolManager(**pool_manager_init_args)

def __init__(self, remote_server_addr, keep_alive=False, ignore_proxy: typing.Optional[bool] = False):
def __init__(self, remote_server_addr: str, keep_alive: bool = False, ignore_proxy: bool = False):
self.keep_alive = keep_alive
self._url = remote_server_addr

Expand Down
2 changes: 1 addition & 1 deletion py/selenium/webdriver/safari/remote_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SafariRemoteConnection(RemoteConnection):

browser_name = DesiredCapabilities.SAFARI["browserName"]

def __init__(self, remote_server_addr, keep_alive=True, ignore_proxy=False):
def __init__(self, remote_server_addr: str, keep_alive: bool = True, ignore_proxy: bool = False):
super().__init__(remote_server_addr, keep_alive, ignore_proxy=ignore_proxy)
self._commands["GET_PERMISSIONS"] = ("GET", "/session/$sessionId/apple/permissions")
self._commands["SET_PERMISSIONS"] = ("POST", "/session/$sessionId/apple/permissions")
Expand Down
5 changes: 1 addition & 4 deletions py/selenium/webdriver/safari/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ def __init__(
)

self._reuse_service = reuse_service
if service:
self.service = service
else:
self.service = Service(executable_path, port=port, quiet=quiet, service_args=service_args)
self.service = service or Service(executable_path, port=port, quiet=quiet, service_args=service_args)
if not reuse_service:
self.service.start()

Expand Down

0 comments on commit 1d2ea04

Please sign in to comment.