From 58c3c5c887a25aba3a326c822aeb990cd40ccd2b Mon Sep 17 00:00:00 2001 From: symonk Date: Sun, 2 Oct 2022 16:41:35 +0100 Subject: [PATCH] [py]: Adding a start/stop interface for typing --- py/selenium/webdriver/protocols.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 py/selenium/webdriver/protocols.py diff --git a/py/selenium/webdriver/protocols.py b/py/selenium/webdriver/protocols.py new file mode 100644 index 0000000000000..72b35d4874e80 --- /dev/null +++ b/py/selenium/webdriver/protocols.py @@ -0,0 +1,12 @@ +from typing_extensions import Protocol + + +class Launchable(Protocol): + """An implicit interface for starting and stopping a service. This is + primarily used for structural subtyping.""" + + def start(self) -> None: + """Start the service.""" + + def stop(self) -> None: + """Stop the service."""