Skip to content

Commit aa14931

Browse files
committed
Replace counsel function with built-in project alternative.
* le-python.el (lispy--python-poetry-name): Fix logic. (lispy--python-proc): Replace counsel function with built-in project alternative.
1 parent c7bad67 commit aa14931

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

le-python.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ it at one time."
300300
(defun lispy--python-poetry-name ()
301301
(when-let* ((bfn (buffer-file-name))
302302
(root (locate-dominating-file bfn "pyproject.toml"))
303-
(pyproject (file-name-directory root)))
303+
(pyproject (expand-file-name "pyproject.toml" root)))
304304
(and (file-exists-p pyproject)
305305
(not (equal python-shell-interpreter "python"))
306306
(with-current-buffer (find-file-noselect pyproject)
@@ -357,7 +357,8 @@ it at one time."
357357
(buffer
358358
(let ((python-shell-completion-native-enable nil)
359359
(default-directory (if poetry-name
360-
(counsel-locate-git-root)
360+
(expand-file-name
361+
(project-root (project-current)))
361362
default-directory)))
362363
(python-shell-make-comint
363364
python-binary-name proc-name nil nil))))

0 commit comments

Comments
 (0)