Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

refactoring of pylint support

  • Loading branch information...
commit fe697d6c081e1797e3e3c025b263cad1e4e5d819 1 parent ce7fbcd
@tavisrudd authored
Showing with 3 additions and 9 deletions.
  1. +3 −9 dss-python.el
View
12 dss-python.el
@@ -5,6 +5,8 @@
(require 'python-mode)
(require 'flymake)
+(require 'dss-generic-code-tools) ; flymake/lint stuff
+
;;; see http://pedrokroger.net/blog/2010/07/configuring-emacs-as-a-python-ide-2/
;;; for a good overview of another very complete setup
(add-to-list 'auto-mode-alist '("\\.py$" . python-mode))
@@ -24,18 +26,10 @@
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pycodecheck-init)))
-(defun dss/pylint-msgid-at-point ()
- (interactive)
- (let (msgid
- (line-no (line-number-at-pos)))
- (dolist (elem flymake-err-info msgid)
- (if (eq (car elem) line-no)
- (let ((err (car (second elem))))
- (setq msgid (second (split-string (flymake-ler-text err)))))))))
(defun dss/pylint-silence (msgid)
"Add a special pylint comment to silence a particular warning."
- (interactive (list (read-from-minibuffer "msgid: " (dss/pylint-msgid-at-point))))
+ (interactive (list (read-from-minibuffer "msgid: " (dss/flymake-msgid-at-point))))
(save-excursion
(comment-dwim nil)
(if (looking-at "pylint:")
Please sign in to comment.
Something went wrong with that request. Please try again.