From 5a50cb3d4fc6dff637fbb8e98b30acaca2c7fbaa Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Wed, 24 Jan 2024 14:13:52 +0100 Subject: Fix Emacs linter setup for Python files --- tw/home/files/emacs-init.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tw/home') diff --git a/tw/home/files/emacs-init.el b/tw/home/files/emacs-init.el index d3f6f66d..ef09782a 100644 --- a/tw/home/files/emacs-init.el +++ b/tw/home/files/emacs-init.el @@ -397,10 +397,11 @@ If CREATE is true and the resulting directory does not exist, create it." :commands (python-mode python-ts-mode) :mode (((rx ".py" (? (or ?\i ?\w)) eos) . python-ts-mode) ((rx ".aurora" eos) . python-ts-mode)) - :flymake-hook - ;; Disable all flymake-collection checkers in Python modes, since eglot should take care of it. - (python-ts-mode) - (python-mode)) + :config + ;; Disable all flymake-collection linters in Python modes, since eglot/pylsp + ;; should take care of it. It doesn't do type checking, so enable mypy. + (cl-dolist (mode '(python-ts-mode python-mode)) + (add-to-list 'flymake-collection-config `(,mode flymake-mypy)))) (use-package rec-mode :mode (rx ".rec" eos)) -- cgit v1.2.3