lbolla / emacs-flycheck-mypy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncertain how to use

stoeckley opened this issue · comments

I've installed this, and mypy. On a test source file from the command line, when I run mypy, I get a proper error about a mismatched type hint.

I have Flycheck running on the same source file in emacs, but I'm not sure how to activate the mypy features of your script, which is installed. I see FlyC in the mode line, but flycheck-next-error and other similar commands report no errors. What do I need to do to actually run the mypy checker with flycheck?

Also -- there is a comment in your source about desiring deactivation of flake8 -- I find the flake8 syntax checking fantastic, and since this is a different task than mypy, it's not clear to me why I cannot use both?

Thanks, looking forward to getting this working!

I am able to get mypy checks in this roundabout way: run flycheck-compile, then explicitly enter python-mypy as the syntax checker. I suspect the goal is to have it more automatic than this?

flycheck-mypy is now part of flycheck. You should probably check with them?
Probably you do need to enable it like (flycheck-add-next-checker 'python-pylint '(warning . python-mypy) t).

Thanks, I got it working. I still had to explicitly require your flycheck-mypy, however -- the included checkers in flycheck (recent version) do not show python-mypy. The flycheck-add-next-checker was indeed what I needed, thanks.