Skip to content

Commit e49a848

Browse files
committed
Don't show anything in the minibuffer when removing unused imports
1 parent e40d3fa commit e49a848

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pyimport.el

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
;; Author: Wilfred Hughes <me@wilfred.me.uk>
66
;; Created: 25 Jun 2016
77
;; Version: 1.1
8-
;; Package-Requires: ((dash "2.8.0") (s "1.9.0"))
8+
;; Package-Requires: ((dash "2.8.0") (s "1.9.0") (shut-up "0.3.2"))
99
;;; Commentary:
1010

1111
;; This package can remove unused Python imports, or insert missing
@@ -36,6 +36,7 @@
3636
(require 'rx)
3737
(require 's)
3838
(require 'dash)
39+
(require 'shut-up)
3940

4041
(defun pyimport--current-line ()
4142
"Return the whole line at point, excluding the trailing newline."
@@ -269,8 +270,9 @@ Required for `pyimport-remove-unused'.")
269270
(user-error "You need to install pyflakes or set pyimport-pyflakes-path"))
270271

271272
(let (flycheck-output)
272-
(shell-command-on-region
273-
(point-min) (point-max) pyimport-pyflakes-path "*pyimport*")
273+
(shut-up
274+
(shell-command-on-region
275+
(point-min) (point-max) pyimport-pyflakes-path "*pyimport*"))
274276
(with-current-buffer "*pyimport*"
275277
(setq flycheck-output (buffer-string)))
276278
(kill-buffer "*pyimport*")

0 commit comments

Comments
 (0)