From 61d877ee655972da38dd25393f3bb1f512eef2cc Mon Sep 17 00:00:00 2001 From: delta456 Date: Sat, 31 Aug 2024 01:16:18 +0530 Subject: [PATCH] fix type errors for `input_device` and `file_detector` --- 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