From 9633f27b1339b078f046d86374703e4ff7b0cdc8 Mon Sep 17 00:00:00 2001 From: Martin Polden Date: Tue, 11 Aug 2020 20:06:08 +0200 Subject: python: Test for flake8 executable --- lisp/init-python.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp/init-python.el') diff --git a/lisp/init-python.el b/lisp/init-python.el index 64ea3bc..e5223b2 100644 --- a/lisp/init-python.el +++ b/lisp/init-python.el @@ -9,8 +9,9 @@ :commands python-mode :hook (python-mode . python-mode-buffer-local-variables) :config - ;; use flake8 as flymake backend - (setq python-flymake-command '("flake8" "-")) + ;; prefer flake8 as flymake backend + (when (executable-find "flake8") + (setq python-flymake-command '("flake8" "-"))) ;; prefer python3 interpreter (when (executable-find "python3") -- cgit v1.2.3