Skip to content

Commit f05e39d

Browse files
committed
refactor: simplify FindElementsMixin._get_expression_type startswith checks into single tuple
1 parent ec4eb90 commit f05e39d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pydoll/elements/mixins/find_elements_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ def _get_expression_type(expression: str) -> By:
478478
- XPath: starts with ./, or /
479479
- Default: CSS_SELECTOR
480480
"""
481-
if any([expression.startswith('./'), expression.startswith('/'), expression.startswith('(/')]):
481+
if expression.startswith(('./', '/', '(/')):
482482
return By.XPATH
483483

484484
return By.CSS_SELECTOR

0 commit comments

Comments
 (0)