diff --git a/AUTHORS b/AUTHORS index a352f1f77c970..02bc36b75b841 100644 --- a/AUTHORS +++ b/AUTHORS @@ -518,6 +518,7 @@ shin Shinya Kasatani Shubham Singh <41840111+singh811@users.noreply.github.com> Shuhai Shen +Simon K Simon Stewart Simon Stewart Simon Stewart diff --git a/py/selenium/webdriver/common/bidi/cdp.py b/py/selenium/webdriver/common/bidi/cdp.py index 1fc2d19ecefe2..d5b9726d36e81 100644 --- a/py/selenium/webdriver/common/bidi/cdp.py +++ b/py/selenium/webdriver/common/bidi/cdp.py @@ -66,7 +66,7 @@ def import_devtools(ver): # because cdp has been updated but selenium python has not been released yet. devtools_path = pathlib.Path(__file__).parents[1].joinpath("devtools") versions = tuple(f.name for f in devtools_path.iterdir() if f.is_dir()) - latest = max((int(x[1:]) for x in versions)) + latest = max(int(x[1:]) for x in versions) selenium_logger = logging.getLogger(__name__) selenium_logger.debug(f"Falling back to loading `devtools`: v{latest}") devtools = importlib.import_module(f"{base}{latest}") diff --git a/py/selenium/webdriver/remote/webelement.py b/py/selenium/webdriver/remote/webelement.py index ad6241da35093..1592db94d0715 100644 --- a/py/selenium/webdriver/remote/webelement.py +++ b/py/selenium/webdriver/remote/webelement.py @@ -420,7 +420,7 @@ def find_element(self, by=By.ID, value=None) -> WebElement: return self._execute(Command.FIND_CHILD_ELEMENT, {"using": by, "value": value})['value'] - def find_elements(self, by=By.ID, value=None) -> typing.List[WebElement]: + def find_elements(self, by=By.ID, value=None) -> list[WebElement]: """ Find elements given a By strategy and locator. diff --git a/py/test/selenium/webdriver/common/webserver.py b/py/test/selenium/webdriver/common/webserver.py index 5c2df2444998f..c2c7ac41b18e4 100644 --- a/py/test/selenium/webdriver/common/webserver.py +++ b/py/test/selenium/webdriver/common/webserver.py @@ -112,7 +112,7 @@ def do_POST(self): f""" {contents} - """.encode('utf-8') + """.encode() ) except Exception as e: self.send_error(500, f"Error found: {e}")