Add extra arguments for flymake-collection-mypy

This commit is contained in:
Evie Litherland-Smith 2024-03-19 10:39:11 +00:00
parent 82968da65f
commit 02ecfb51ec

View file

@ -145,10 +145,22 @@ Set treesit to fontify all elements, default was 3 (out of 4)
:diminish
:defer
:after flymake)
#+end_src
*** mypy
#+begin_src emacs-lisp
(with-eval-after-load 'flymake-collection
(customize-set-variable 'flymake-collection-mypy-args
'("--ignore-missing-imports"
"--follow-imports=skip"
"--check-untyped-defs"
"--warn-unreachable"
"--show-error-codes"
"--no-color-output")))
(with-eval-after-load 'python
(add-hook 'python-base-mode-hook
(defun python-mode-setup-flymake ()
(require 'flymake-collection)
(add-hook 'flymake-diagnostic-functions 'flymake-collection-mypy nil t))))
#+end_src