Last active
July 5, 2016 11:52
-
-
Save RyanKung/f9bf9f2459694adfce1be7064febd97d to your computer and use it in GitHub Desktop.
mypy backend plugin for flymake, do play with mypy !!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; mypy.el --- mypy plugin for flymake | |
| ;;; Commentary: | |
| ;;; Code: | |
| (require 'flymake) | |
| (defun flymake-mypy-init () | |
| "Init mypy." | |
| (let* ((temp-file (flymake-init-create-temp-buffer-copy | |
| 'flymake-create-temp-inplace)) | |
| (local-file (file-relative-name | |
| temp-file | |
| (file-name-directory buffer-file-name)))) | |
| (list "mypy" (list local-file "-s")))) | |
| (when (load "flymake" t) | |
| (add-to-list 'flymake-allowed-file-name-masks '("\\.py\\'" flymake-mypy-init)) | |
| ) | |
| (provide 'mypy) | |
| ;;; mypy.el ends here | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment