File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
robocorp-code/src/robocorp_code/inspector/java/robocorp_java Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -27,20 +27,22 @@ def _parse_locator(locator: str, strict_default=False):
2727 lvl_search = []
2828 strict_mode = strict_default
2929 for condition in conditions :
30- parts : Sequence [str | int ] = condition .split (":" , 1 )
30+ parts : Sequence [str ] = condition .split (":" , 1 )
31+ name : str = parts [0 ] if len (parts ) > 0 else ''
32+ value : Union [str , int ] = parts [1 ] if len (parts ) > 1 else ''
3133 if len (parts ) == 1 :
3234 parts = ["name" , parts [0 ]]
3335 elif parts [0 ].lower () == "strict" :
3436 strict_mode = bool (parts [1 ])
3537 continue
3638 elif parts [0 ] in IntegerLocatorTypes :
3739 try :
38- parts [ 1 ] = int (parts [1 ])
40+ value = int (parts [1 ])
3941 except ValueError as err :
4042 raise Exception (
4143 "Locator '%s' needs to be of 'integer' type" % parts [0 ]
4244 ) from err
43- lvl_search .append (SearchElement (parts [ 0 ], parts [ 1 ] , strict = strict_mode ))
45+ lvl_search .append (SearchElement (name , value , strict = strict_mode ))
4446 searches .append (lvl_search )
4547 return searches
4648
You can’t perform that action at this time.
0 commit comments