Skip to content

Commit

Permalink
fix: fixed typing checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Jul 25, 2020
1 parent 682a73f commit 01378f1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions aw_qt/manager.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import os
import platform
from glob import glob
from time import sleep
import sys
import logging
import subprocess
import shutil
from glob import glob
from time import sleep
from typing import Optional, List, Dict, Set, Tuple

import aw_core
Expand Down Expand Up @@ -110,7 +111,7 @@ def start(self) -> None:

# Create a process group, become its leader
# TODO: This shouldn't go here
if platform.system() != "Windows":
if sys.platform != "win32":
os.setpgrp()

exec_path, location = _locate_executable(self.name)
Expand All @@ -126,10 +127,10 @@ def start(self) -> None:
# Don't display a console window on Windows
# See: https://github.com/ActivityWatch/activitywatch/issues/212
startupinfo = None
if platform.system() == "Windows":
startupinfo = subprocess.STARTUPINFO() # type: ignore
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW # type: ignore
elif platform.system() == "Darwin":
if sys.platform == "win32" or sys.platform == "cygwin":
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
elif sys.platform == "darwin":
logger.info("macOS: Disable dock icon")
import AppKit

Expand Down

0 comments on commit 01378f1

Please sign in to comment.