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 e556455Copy full SHA for e556455
pylsp_ruff/plugin.py
@@ -2,14 +2,22 @@
2
import importlib.util
3
import json
4
import logging
5
+import os
6
import re
7
import shutil
8
import sys
9
from functools import lru_cache
10
from pathlib import PurePath
-from subprocess import CREATE_NO_WINDOW, PIPE, Popen
11
+from subprocess import PIPE, Popen
12
from typing import Dict, Generator, List, Optional
13
14
+if sys.platform == "win32":
15
+ from subprocess import CREATE_NO_WINDOW
16
+else:
17
+ # CREATE_NO_WINDOW flag only available on Windows.
18
+ # Set constant as default `Popen` `creationflag` kwarg value (`0`)
19
+ CREATE_NO_WINDOW = 0
20
+
21
if sys.version_info >= (3, 11):
22
import tomllib
23
else:
0 commit comments