flycheck-pycheckers
flycheck-pycheckers copied to clipboard
"failure of some kind" error message could be more helpful
Hi. I just tried installing this package - and thanks for writing / releasing / maintaining it! I get errors when I visit a Python file:
mypy:Checker indicated failure of some kind
mypy:usage: mypy [-h] [-v] [-V] [more options; see below]
mypy: [-m MODULE] [-p PACKAGE] [-c PROGRAM_TEXT] [files ...]
mypy:mypy: error: Mypy no longer supports checking Python 2 code. Consider pinning to mypy<0.980 if you need to check Python 2 code.
flake8:Checker indicated failure of some kind
But there is no indication of what the errors are so I don't know what to do next, other than look at the flycheck-pycheckers elisp and see if I can find and output the error message. But it feels like I shouldn't need to be doing that and that I am somehow doing something wrong...
Thanks for any help.
Hi there, and thanks for submitting an issue!
The error output from the checker is included in this message. In this case mypy outputs a (not helpful) usage message, and then the actual error is:
error: Mypy no longer supports checking Python 2 code. Consider pinning to mypy<0.980 if you need to check Python 2 code.
Is this what you were looking for, or would you prefer to see something else here?
Hi, thanks for the reply. I should have been more specific: the flake8
error has no information :-)
Maybe flake8
is just exiting non-zero for some reason, without writing to stdout/stderr?
Got it, thanks for clarifying! Yes, so we try to print out whatever context around the failure we have (as in the mypy failure in your example). It looks like flake8 isn't giving any output -- maybe if you run flycheck-compile
(C-c ! C-c
by default, I believe) on this file we can get more input to see what we might improve?
You can always run the checker with M-x flycheck-compile
and see the raw output from flycheck-pycheckers.py