blob: 4b2a27c06e77f4f47b8ecad5ac334da10fe8e245 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
(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 <file name>:<line> <message>
(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)
|