1

I keep having following warning message, even I have the recent version of python-mypy not sure why this warning message is generated; is there any way to fix this:

Suspicious state from syntax checker python-mypy: Flycheck checker python-mypy returned 2, but its output contained no errors:
utils.py: error: Source file found twice under different module names: 'Program.utils' and 'utils'
Found 1 error in 1 file (checked 1 source file)

Try installing a more recent version of python-mypy, and please open a bug report if the issue persists in the latest release. Thanks!


pip-setup:

$ pip freeze | grep mypy
flake8-mypy==17.8.0
mypy==0.790
mypy-extensions==0.4.3

output of elpy-config within the emacs:

Elpy Configuration

Emacs.............: 26.3 Elpy..............: 1.34.0 Virtualenv........: venv (/home/alper/venv) Interactive Python: python3 3.7.5 (/home/alper/venv/bin/python3) RPC virtualenv....: rpc-venv (/home/alper/.emacs.d/elpy/rpc-venv) Python...........: python 3.7.5 (/home/alper/.emacs.d/elpy/rpc-venv/bin/python) Jedi.............: 0.17.2 Rope.............: 0.16.0 Autopep8.........: 1.5.4 Yapf.............: 0.30.0 Black............: 20.8b1 Syntax checker....: flake8 (/home/alper/venv/bin/flake8)

alper
  • 1,370
  • 1
  • 13
  • 35

1 Answers1

1

You're getting this message because Flycheck ran mypy to see if your code was correct and while mypy returned an error code, it didn't print out a list of errors (at least not as far as Flycheck could tell.)

The error message includes the output from mypy:

utils.py: error: Source file found twice under different module names: 'Program.utils' and 'utils'
Found 1 error in 1 file (checked 1 source file)

A human might interpret this as an error message, I suppose, but it doesn't match any of the regular expressions that Flycheck uses to look for errors. You could update those regular expressions yourself, or even file a bug asking the Flycheck developers to fix it.

db48x
  • 17,977
  • 1
  • 22
  • 28