From 672029f8cbc33a03de5d509c68b70426cc2dad11 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 24 Jan 2025 16:27:11 +0000 Subject: [PATCH] Always set python-check-command to use mypy --- init.el | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/init.el b/init.el index 7511ed1..0d9797c 100644 --- a/init.el +++ b/init.el @@ -1148,16 +1148,11 @@ :hook ((python-base-mode . (lambda () (set-fill-column 88) (display-fill-column-indicator-mode +1) - (setq-local - python-check-command - (cond - ((executable-find "mypy" t) "mypy --check-untyped-defs --warn-unreachable --show-error-codes --ignore-missing-imports") - (t "pyflakes")) - python-flymake-command - (cond - ((executable-find "ruff" t) '("ruff" "check" "--output-format=concise" "--stdin-filename=stdin" "-")) - ((executable-find "flake8" t) '("flake8" "--max-line-length" "88" "-")) - (t '("pyflakes"))))))) + (setq-local python-flymake-command + (cond + ((executable-find "ruff" t) '("ruff" "check" "--output-format=concise" "--stdin-filename=stdin" "-")) + ((executable-find "flake8" t) '("flake8" "--max-line-length" "88" "-")) + (t '("pyflakes"))))))) :custom (python-interpreter "python3") (python-shell-interpreter "python3") @@ -1166,6 +1161,7 @@ (python-indent-guess-indent-offset nil) (python-indent-offset 4) (python-indent-def-block-scale 1) + (python-check-command "mypy --check-untyped-defs --warn-unreachable --show-error-codes --ignore-missing-imports") :config (setq python-ts-mode-hook python-mode-hook))