(setq python-indent-offset 2) (add-hook 'python-mode-hook 'eldoc-mode t) (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)) (add-to-list 'auto-mode-alist '("\\.BUILD\\'" . python-mode)) (add-to-list 'auto-mode-alist '("\\.aurora\\'" . python-mode)) ;;; errors are reported like this: ;;; E241:ERROR : (flycheck-define-checker source-check "A syntax checker for python source code in Source, using `check.pex'" :command ("check.pex" source) :error-patterns ((error line-start (id (1+ nonl)) ":ERROR" (1+ nonl) ":" line (message) line-end) (warning line-start (id (1+ nonl)) ":WARNING" (1+ nonl) ":" line (message) line-end)) :predicate fc/check-source-p :modes (python-mode)) (add-to-list 'flycheck-checkers 'source-check) (provide 'module-python)