Skip to content

Commit 39eedc1

Browse files
committed
Fix free variable assignment byte compilation warning
1 parent a7b103e commit 39eedc1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lsp-pyright.el

+4-2
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ Only available in Emacs 27 and above."
156156
:type 'list
157157
:group 'lsp-pyright)
158158

159+
(defvar lsp-pyright--project-info-cache nil
160+
"Used to cache results from project management tools between invocations.")
161+
159162
(defun lsp-pyright--locate-pipenv ()
160163
"Get the path of the pipenv executable. If
161164
`lsp-pyright-pipenv-executable-cmd' is non-nil it will be
@@ -202,8 +205,7 @@ CMD does not return a failure status."
202205
"Queries poetry or pipenv for project information and returns
203206
either the virtualenv or the python interpreter of the project
204207
depending on whether the value of PROPERTY is 'python or 'venv."
205-
(unless (and (boundp 'lsp-pyright--project-info-cache)
206-
lsp-pyright--project-info-cache)
208+
(unless lsp-pyright--project-info-cache
207209
(setq-local
208210
lsp-pyright--project-info-cache
209211
(let ((project-info

0 commit comments

Comments
 (0)