Skip to content

Commit 5435640

Browse files
committed
Name the symbol that we couldn't find
If the user doesn't have point on the correct variable, this helps them realise what's wrong.
1 parent f5e56b6 commit 5435640

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyimport.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Dumb: just scans open Python buffers."
141141
(line (pyimport--import-simplify example-line symbol)))
142142
(pyimport--insert-import line)
143143
(message "%s (from %s)" line (get-text-property 0 'pyimport-path example-line)))
144-
(user-error "No matches found"))))
144+
(user-error "No matches found for %s" symbol))))
145145

146146
(defun pyimport--extract-unused-var (flycheck-message)
147147
"Extract the import variable name from FLYCHECK-MESSAGE.

0 commit comments

Comments
 (0)