Skip to content

Commit

Permalink
Moved type hints inline for electron.py
Browse files Browse the repository at this point in the history
  • Loading branch information
thatfloflo committed Feb 10, 2023
1 parent 59a494e commit 3ca09bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
8 changes: 5 additions & 3 deletions 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')
Expand Down
15 changes: 0 additions & 15 deletions eel/electron.pyi

This file was deleted.

0 comments on commit 3ca09bd

Please sign in to comment.