Skip to content

Commit 18a23ad

Browse files
committed
[py]: bump mypy in tox recipe; tweak some additional mypy complaints
1 parent 14b1bef commit 18a23ad

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

py/selenium/webdriver/common/actions/input_device.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ class InputDevice:
2222
"""Describes the input device being used for the action."""
2323

2424
def __init__(self, name=None):
25-
if not name:
26-
self.name = uuid.uuid4()
27-
else:
28-
self.name = name
29-
25+
self.name = name or uuid.uuid4()
3026
self.actions = []
3127

3228
def add_action(self, action):

py/selenium/webdriver/remote/webdriver.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ def get_cookie(self, name) -> typing.Optional[typing.Dict]:
685685
"""
686686
with contextlib.suppress(NoSuchCookieException):
687687
return self.execute(Command.GET_COOKIE, {"name": name})["value"]
688+
return None
688689

689690
def delete_cookie(self, name) -> None:
690691
"""Deletes a single cookie with the given name.

py/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ commands = sphinx-build -b html -d ../build/doctrees docs/source ../build/docs/a
1313
[testenv:mypy]
1414
skip_install = true
1515
deps =
16-
mypy==0.991
16+
mypy==1.1.1
1717
lxml==4.9.1
1818
types-urllib3==1.26.25
1919
types-certifi==2021.10.8.3

0 commit comments

Comments
 (0)