From 49f2f76d229d7a0ea2b4b8a6667abb2095ac0e90 Mon Sep 17 00:00:00 2001 From: Swastik Baranwal Date: Tue, 10 Sep 2024 21:04:23 +0530 Subject: [PATCH] fix type errors for `input_device` and `file_detector` (#14459) Co-authored-by: Sri Harsha <12621691+harsha509@users.noreply.github.com> --- py/selenium/webdriver/common/actions/input_device.py | 2 +- py/selenium/webdriver/remote/file_detector.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/py/selenium/webdriver/common/actions/input_device.py b/py/selenium/webdriver/common/actions/input_device.py index 46ba11cb5d0be..d9b2eee2739ac 100644 --- a/py/selenium/webdriver/common/actions/input_device.py +++ b/py/selenium/webdriver/common/actions/input_device.py @@ -35,5 +35,5 @@ def add_action(self, action: Any) -> None: def clear_actions(self) -> None: self.actions = [] - def create_pause(self, duration: int = 0) -> None: + def create_pause(self, duration: float = 0) -> None: pass diff --git a/py/selenium/webdriver/remote/file_detector.py b/py/selenium/webdriver/remote/file_detector.py index dccdb28f01cbb..77ce2a546dcfa 100644 --- a/py/selenium/webdriver/remote/file_detector.py +++ b/py/selenium/webdriver/remote/file_detector.py @@ -50,3 +50,4 @@ def is_local_file(self, *keys: AnyKey) -> Optional[str]: with suppress(OSError): if Path(file_path).is_file(): return file_path + return None