File tree Expand file tree Collapse file tree 16 files changed +44
-31
lines changed Expand file tree Collapse file tree 16 files changed +44
-31
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def __init__(
4040 executable_path = None ,
4141 port : int = 0 ,
4242 service_args : Optional [List [str ]] = None ,
43- log_output : SubprocessStdAlias = None ,
43+ log_output : Optional [ SubprocessStdAlias ] = None ,
4444 env : Optional [Mapping [str , str ]] = None ,
4545 ** kwargs ,
4646 ) -> None :
Original file line number Diff line number Diff line change @@ -37,12 +37,12 @@ class ChromiumService(service.Service):
3737
3838 def __init__ (
3939 self ,
40- executable_path : str = None ,
40+ executable_path : Optional [ str ] = None ,
4141 port : int = 0 ,
4242 service_args : Optional [List [str ]] = None ,
43- log_output : SubprocessStdAlias = None ,
43+ log_output : Optional [ SubprocessStdAlias ] = None ,
4444 env : Optional [Mapping [str , str ]] = None ,
45- driver_path_env_key : str = None ,
45+ driver_path_env_key : Optional [ str ] = None ,
4646 ** kwargs ,
4747 ) -> None :
4848 self .service_args = service_args or []
Original file line number Diff line number Diff line change 1414# KIND, either express or implied. See the License for the
1515# specific language governing permissions and limitations
1616# under the License.
17+
18+ from typing import Optional
19+
1720from .interaction import Interaction
1821from .wheel_input import WheelInput
1922
2023
2124class WheelActions (Interaction ):
22- def __init__ (self , source : WheelInput = None ):
25+ def __init__ (self , source : Optional [ WheelInput ] = None ):
2326 if not source :
2427 source = WheelInput ("wheel" )
2528 super ().__init__ (source )
Original file line number Diff line number Diff line change @@ -55,11 +55,11 @@ class Service(ABC):
5555
5656 def __init__ (
5757 self ,
58- executable_path : str = None ,
58+ executable_path : Optional [ str ] = None ,
5959 port : int = 0 ,
60- log_output : SubprocessStdAlias = None ,
60+ log_output : Optional [ SubprocessStdAlias ] = None ,
6161 env : Optional [Mapping [Any , Any ]] = None ,
62- driver_path_env_key : str = None ,
62+ driver_path_env_key : Optional [ str ] = None ,
6363 ** kwargs ,
6464 ) -> None :
6565 if isinstance (log_output , str ):
Original file line number Diff line number Diff line change @@ -37,12 +37,12 @@ class Service(service.ChromiumService):
3737
3838 def __init__ (
3939 self ,
40- executable_path : str = None ,
40+ executable_path : Optional [ str ] = None ,
4141 port : int = 0 ,
42- log_output : SubprocessStdAlias = None ,
42+ log_output : Optional [ SubprocessStdAlias ] = None ,
4343 service_args : Optional [List [str ]] = None ,
4444 env : Optional [Mapping [str , str ]] = None ,
45- driver_path_env_key : str = None ,
45+ driver_path_env_key : Optional [ str ] = None ,
4646 ** kwargs ,
4747 ) -> None :
4848 self .service_args = service_args or []
Original file line number Diff line number Diff line change 1515# specific language governing permissions and limitations
1616# under the License.
1717
18+ from typing import Optional
19+
1820from selenium .webdriver .chromium .webdriver import ChromiumDriver
1921from selenium .webdriver .common .desired_capabilities import DesiredCapabilities
2022
@@ -27,8 +29,8 @@ class WebDriver(ChromiumDriver):
2729
2830 def __init__ (
2931 self ,
30- options : Options = None ,
31- service : Service = None ,
32+ options : Optional [ Options ] = None ,
33+ service : Optional [ Service ] = None ,
3234 keep_alive : bool = True ,
3335 ) -> None :
3436 """Creates a new instance of the edge driver. Starts the service and
Original file line number Diff line number Diff line change @@ -37,12 +37,12 @@ class Service(service.Service):
3737
3838 def __init__ (
3939 self ,
40- executable_path : str = None ,
40+ executable_path : Optional [ str ] = None ,
4141 port : int = 0 ,
4242 service_args : Optional [List [str ]] = None ,
43- log_output : SubprocessStdAlias = None ,
43+ log_output : Optional [ SubprocessStdAlias ] = None ,
4444 env : Optional [Mapping [str , str ]] = None ,
45- driver_path_env_key : str = None ,
45+ driver_path_env_key : Optional [ str ] = None ,
4646 ** kwargs ,
4747 ) -> None :
4848 self .service_args = service_args or []
Original file line number Diff line number Diff line change 2020import zipfile
2121from contextlib import contextmanager
2222from io import BytesIO
23+ from typing import Optional
2324
2425from selenium .webdriver .common .driver_finder import DriverFinder
2526from selenium .webdriver .remote .webdriver import WebDriver as RemoteWebDriver
@@ -37,8 +38,8 @@ class WebDriver(RemoteWebDriver):
3738
3839 def __init__ (
3940 self ,
40- options : Options = None ,
41- service : Service = None ,
41+ options : Optional [ Options ] = None ,
42+ service : Optional [ Service ] = None ,
4243 keep_alive : bool = True ,
4344 ) -> None :
4445 """Creates a new instance of the Firefox driver. Starts the service and
Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ class Service(service.Service):
2626
2727 def __init__ (
2828 self ,
29- executable_path : str = None ,
29+ executable_path : Optional [ str ] = None ,
3030 port : int = 0 ,
3131 host : Optional [str ] = None ,
3232 service_args : Optional [List [str ]] = None ,
3333 log_level : Optional [str ] = None ,
34- log_output : SubprocessStdAlias = None ,
35- driver_path_env_key : str = None ,
34+ log_output : Optional [ SubprocessStdAlias ] = None ,
35+ driver_path_env_key : Optional [ str ] = None ,
3636 ** kwargs ,
3737 ) -> None :
3838 """Creates a new instance of the Service.
Original file line number Diff line number Diff line change 1515# specific language governing permissions and limitations
1616# under the License.
1717
18+ from typing import Optional
19+
1820from selenium .webdriver .common .driver_finder import DriverFinder
1921from selenium .webdriver .remote .client_config import ClientConfig
2022from selenium .webdriver .remote .remote_connection import RemoteConnection
@@ -30,8 +32,8 @@ class WebDriver(RemoteWebDriver):
3032
3133 def __init__ (
3234 self ,
33- options : Options = None ,
34- service : Service = None ,
35+ options : Optional [ Options ] = None ,
36+ service : Optional [ Service ] = None ,
3537 keep_alive : bool = True ,
3638 ) -> None :
3739 """Creates a new instance of the Ie driver.
You can’t perform that action at this time.
0 commit comments