From 3ca09bde93ce9df0e618d5163a0e02b84ed556dc Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 10 Feb 2023 21:25:10 +0000 Subject: [PATCH] Moved type hints inline for electron.py --- eel/electron.py | 8 +++++--- eel/electron.pyi | 15 --------------- 2 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 eel/electron.pyi diff --git a/eel/electron.py b/eel/electron.py index 7a443025..f5897535 100644 --- a/eel/electron.py +++ b/eel/electron.py @@ -1,17 +1,19 @@ +from __future__ import annotations import sys import os import subprocess as sps import whichcraft as wch +from typing import List, Dict, Any, Optional -name = 'Electron' +name: str = 'Electron' -def run(path, options, start_urls): +def run(path: str, options: Dict[str, Any], start_urls: List[str]): cmd = [path] + options['cmdline_args'] cmd += ['.', ';'.join(start_urls)] sps.Popen(cmd, stdout=sys.stdout, stderr=sys.stderr, stdin=sps.PIPE) -def find_path(): +def find_path() -> Optional[str]: if sys.platform in ['win32', 'win64']: # It doesn't work well passing the .bat file to Popen, so we get the actual .exe bat_path = wch.which('electron') diff --git a/eel/electron.pyi b/eel/electron.pyi deleted file mode 100644 index 80dc8a42..00000000 --- a/eel/electron.pyi +++ /dev/null @@ -1,15 +0,0 @@ -from typing import List, Dict, Any, Optional -import sys -import os -import subprocess as sps -import whichcraft as wch - -name: str = ... - -def run(_path: str, options: Dict[str, Any], start_urls: List[str]) -> None: - ... - - -def find_path() -> Optional[str]: - ... -