File tree Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 1616# under the License.
1717
1818import uuid
19+ from typing import Any
20+ from typing import List
1921from typing import Optional
2022
2123
@@ -24,14 +26,14 @@ class InputDevice:
2426
2527 def __init__ (self , name : Optional [str ] = None ):
2628 self .name = name or uuid .uuid4 ()
27- self .actions = []
29+ self .actions : List [ Any ] = []
2830
29- def add_action (self , action ) :
31+ def add_action (self , action : Any ) -> None :
3032 """"""
3133 self .actions .append (action )
3234
33- def clear_actions (self ):
35+ def clear_actions (self ) -> None :
3436 self .actions = []
3537
36- def create_pause (self , duration : int = 0 ):
38+ def create_pause (self , duration : int = 0 ) -> None :
3739 pass
Original file line number Diff line number Diff line change 2323import sysconfig
2424from pathlib import Path
2525from typing import List
26+ from typing import Optional
2627
2728from selenium .common import WebDriverException
2829
@@ -67,9 +68,11 @@ def _get_binary() -> Path:
6768 if exe is not None :
6869 compiled_path = compiled_path .with_suffix (exe )
6970
70- if (path := os .getenv ("SE_MANAGER_PATH" )) is not None :
71- logger .debug ("Selenium Manager set by env SE_MANAGER_PATH to: %s" , path )
72- path = Path (path )
71+ path : Optional [Path ] = None
72+
73+ if (env_path := os .getenv ("SE_MANAGER_PATH" )) is not None :
74+ logger .debug ("Selenium Manager set by env SE_MANAGER_PATH to: %s" , env_path )
75+ path = Path (env_path )
7376 elif compiled_path .exists ():
7477 path = compiled_path
7578 else :
@@ -92,7 +95,7 @@ def _get_binary() -> Path:
9295
9396 path = Path (__file__ ).parent .joinpath (location )
9497
95- if not path .is_file ():
98+ if path is None or not path .is_file ():
9699 raise WebDriverException (f"Unable to obtain working Selenium Manager binary; { path } " )
97100
98101 logger .debug ("Selenium Manager binary found at: %s" , path )
Original file line number Diff line number Diff line change 1515# specific language governing permissions and limitations
1616# under the License.
1717from enum import Enum
18+ from typing import Any
19+ from typing import Dict
1820
1921from selenium .webdriver .common .desired_capabilities import DesiredCapabilities
2022from selenium .webdriver .common .options import ArgOptions
@@ -362,8 +364,8 @@ class Options(ArgOptions):
362364
363365 def __init__ (self ) -> None :
364366 super ().__init__ ()
365- self ._options = {}
366- self ._additional = {}
367+ self ._options : Dict [ str , Any ] = {}
368+ self ._additional : Dict [ str , Any ] = {}
367369
368370 @property
369371 def options (self ) -> dict :
@@ -375,7 +377,7 @@ def additional_options(self) -> dict:
375377 """:Returns: The additional options."""
376378 return self ._additional
377379
378- def add_additional_option (self , name : str , value ):
380+ def add_additional_option (self , name : str , value ) -> None :
379381 """Adds an additional option not yet added as a safe option for IE.
380382
381383 :Args:
You can’t perform that action at this time.
0 commit comments