diff --git a/core/utils/processes.py b/core/utils/processes.py index 92beb40e..59fe1c8e 100644 --- a/core/utils/processes.py +++ b/core/utils/processes.py @@ -4,6 +4,7 @@ import os import socket import subprocess import sys +import typing import core from core import APP_FILENAME @@ -96,8 +97,9 @@ class PosixProcess: os.unlink(self.pidpath) +ProcessType = typing.Type[typing.Union[PosixProcess, WindowsProcess]] if os.name == 'nt': - RunningProcess = WindowsProcess + RunningProcess: ProcessType = WindowsProcess else: RunningProcess = PosixProcess