Skip to content

Commit 7193b90

Browse files
committed
fall back to system ruff executable without executable setting
1 parent 9117709 commit 7193b90

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pylsp_ruff/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import logging
44
import re
55
import sys
6+
import shutil
67
from pathlib import PurePath
78
from subprocess import PIPE, Popen
89
from typing import Dict, Generator, List, Optional
@@ -518,7 +519,7 @@ def run_ruff(
518519
String containing the result in json format.
519520
520521
"""
521-
executable = settings.executable
522+
executable = settings.executable or shutil.which("ruff")
522523

523524
arguments = subcommand.build_args(document_path, settings, fix, extra_arguments)
524525

0 commit comments

Comments
 (0)