mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12:38 +02:00
ignore type hint to windows-only subprocess command
`subprocess.STARTUPINFO()` only exists in windows systems. Because of this, in linux-based systems it was raising type hint issues as it didn't recognize the return function.
This commit is contained in:
parent
6ddd411be8
commit
4aab47af38
2 changed files with 3 additions and 3 deletions
|
@ -17,8 +17,8 @@ else:
|
||||||
|
|
||||||
# Define startupinfo for subprocesses
|
# Define startupinfo for subprocesses
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
startupinfo = subprocess.STARTUPINFO()
|
startupinfo = subprocess.STARTUPINFO() # type: ignore [attr-defined]
|
||||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW # type: ignore [attr-defined]
|
||||||
else:
|
else:
|
||||||
startupinfo = None
|
startupinfo = None
|
||||||
|
|
||||||
|
|
|
@ -417,7 +417,7 @@ class GlobalCommon(object):
|
||||||
resource_path = prefix.joinpath(filename)
|
resource_path = prefix.joinpath(filename)
|
||||||
return str(resource_path)
|
return str(resource_path)
|
||||||
|
|
||||||
def get_subprocess_startupinfo(self):
|
def get_subprocess_startupinfo(self): # type: ignore [no-untyped-def]
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
startupinfo = subprocess.STARTUPINFO()
|
startupinfo = subprocess.STARTUPINFO()
|
||||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||||
|
|
Loading…
Reference in a new issue