Skip to content

Commit

Permalink
Fix undefined variable (#403)
Browse files Browse the repository at this point in the history
Fix for CI failure in
6a50696
  • Loading branch information
dhruvmanila committed Mar 6, 2024
1 parent 7d05711 commit c410d6b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ruff_lsp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1765,9 +1765,10 @@ def _find_ruff_binary_path(settings: WorkspaceSettings) -> str:

if settings["path"]:
# 'path' setting takes priority over everything.
if isinstance(settings["path"], str):
path = [path]
for path in settings["path"]:
paths = settings["path"]
if isinstance(paths, str):
paths = [paths]
for path in paths:
path = os.path.expanduser(os.path.expandvars(path))
if os.path.exists(path):
log_to_output(f"Using 'path' setting: {path}")
Expand Down

0 comments on commit c410d6b

Please sign in to comment.