Skip to content

Commit

Permalink
[py]: More python3.7 improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
symonk committed Jun 14, 2022
1 parent 17907d3 commit d68617a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ shin <[email protected]>
Shinya Kasatani <[email protected]>
Shubham Singh <[email protected]>
Shuhai Shen <[email protected]>
Simon K <[email protected]>
Simon Stewart <[email protected]>
Simon Stewart <[email protected]>
Simon Stewart <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion py/selenium/webdriver/common/bidi/cdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
2 changes: 1 addition & 1 deletion py/selenium/webdriver/remote/webelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion py/test/selenium/webdriver/common/webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def do_POST(self):
f"""<!doctype html>
{contents}
<script>window.top.window.onUploadDone();</script>
""".encode('utf-8')
""".encode()
)
except Exception as e:
self.send_error(500, f"Error found: {e}")
Expand Down

0 comments on commit d68617a

Please sign in to comment.