Skip to content

Instantly share code, notes, and snippets.

@hodgestar
Created March 19, 2013 00:35
Show Gist options
  • Save hodgestar/5192471 to your computer and use it in GitHub Desktop.
Save hodgestar/5192471 to your computer and use it in GitHub Desktop.
;; fly-make-mode for Python
;; pycheck is in ~/bin
(when (load "flymake" t)
(defun flymake-python-init ()
(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 "pycheck" (list local-file))))
(setq flymake-allowed-file-name-masks '())
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-python-init)))
(add-hook 'find-file-hook 'flymake-find-file-hook)
#!/bin/bash
# epylint "$1" 2>/dev/null
pyflakes "$1"
pep8 --repeat "$1"
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment