We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c84958 commit 4968caaCopy full SHA for 4968caa
pylsp_ruff/plugin.py
@@ -7,9 +7,16 @@
7
import sys
8
from functools import lru_cache
9
from pathlib import PurePath
10
-from subprocess import CREATE_NO_WINDOW, PIPE, Popen
+from subprocess import PIPE, Popen
11
from typing import Dict, Generator, List, Optional
12
13
+if sys.platform == "win32":
14
+ from subprocess import CREATE_NO_WINDOW
15
+else:
16
+ # CREATE_NO_WINDOW flag only available on Windows.
17
+ # Set constant as default `Popen` `creationflag` kwarg value (`0`)
18
+ CREATE_NO_WINDOW = 0
19
+
20
if sys.version_info >= (3, 11):
21
import tomllib
22
else:
0 commit comments