Skip to content

Commit 05fec43

Browse files
committed
1 parent 6d52526 commit 05fec43

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎graphviz/_compat.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Platform compatibility."""
22

3-
import platform
3+
import sys
44

55

66
def get_startupinfo() -> None:
@@ -11,7 +11,8 @@ def get_startupinfo() -> None:
1111
assert get_startupinfo() is None, 'get_startupinfo() defaults to a no-op' # type: ignore[func-returns-value] # noqa: E501
1212

1313

14-
if platform.system() == 'Windows': # pragma: no cover
14+
# avoid platform.system() to work around https://github.com/python/mypy/issues/8166
15+
if sys.platform == 'win32' or sys.platform == 'cygwin' or sys.platform == 'msys': # pragma: no cover
1516
import subprocess
1617

1718
def get_startupinfo() -> subprocess.STARTUPINFO: # type: ignore[misc] # noqa: E501

0 commit comments

Comments
 (0)