Skip to content

Commit d68617a

Browse files
committed
[py]: More python3.7 improvements
1 parent 17907d3 commit d68617a

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ shin <shin@example.com>
518518
Shinya Kasatani <shinya@example.com>
519519
Shubham Singh <41840111+singh811@users.noreply.github.com>
520520
Shuhai Shen <shuhai@shuhai.zrh.corp.google.com>
521+
Simon K <jackofspaces@gmail.com>
521522
Simon Stewart <shs96c@users.noreply.github.com>
522523
Simon Stewart <simon.m.stewart@gmail.com>
523524
Simon Stewart <simon.stewart@deliveroo.co.uk>

py/selenium/webdriver/common/bidi/cdp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def import_devtools(ver):
6666
# because cdp has been updated but selenium python has not been released yet.
6767
devtools_path = pathlib.Path(__file__).parents[1].joinpath("devtools")
6868
versions = tuple(f.name for f in devtools_path.iterdir() if f.is_dir())
69-
latest = max((int(x[1:]) for x in versions))
69+
latest = max(int(x[1:]) for x in versions)
7070
selenium_logger = logging.getLogger(__name__)
7171
selenium_logger.debug(f"Falling back to loading `devtools`: v{latest}")
7272
devtools = importlib.import_module(f"{base}{latest}")

py/selenium/webdriver/remote/webelement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def find_element(self, by=By.ID, value=None) -> WebElement:
420420
return self._execute(Command.FIND_CHILD_ELEMENT,
421421
{"using": by, "value": value})['value']
422422

423-
def find_elements(self, by=By.ID, value=None) -> typing.List[WebElement]:
423+
def find_elements(self, by=By.ID, value=None) -> list[WebElement]:
424424
"""
425425
Find elements given a By strategy and locator.
426426

py/test/selenium/webdriver/common/webserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def do_POST(self):
112112
f"""<!doctype html>
113113
{contents}
114114
<script>window.top.window.onUploadDone();</script>
115-
""".encode('utf-8')
115+
""".encode()
116116
)
117117
except Exception as e:
118118
self.send_error(500, f"Error found: {e}")

0 commit comments

Comments
 (0)