flake8-mypy icon indicating copy to clipboard operation
flake8-mypy copied to clipboard

Error running flake8-mypy

Open Dreamsorcerer opened this issue 4 years ago • 4 comments

When I run flake8, I just get a bunch of these errors and nothing else from mypy:

/home/ubuntu/.local/lib/python3.6/site-packages is in the MYPYPATH. Please remove it.
See https://mypy.readthedocs.io/en/latest/running_mypy.html#how-mypy-handles-imports for more info

Dreamsorcerer avatar Apr 26 '20 16:04 Dreamsorcerer

Removing the relevant lines in flake8_mypy.py:179 is enough to fix this. I fixed it as well as a few other issues on my fork if you are interested.

galaunay avatar May 02 '20 18:05 galaunay

I think a workaround is to copy mypy_default.ini to mypy.ini in your project folder, and set mypy_config = mypy.ini in the [flake8] section of your project's setup.cfg.

covracer avatar May 06 '20 13:05 covracer

While that workaround gets past the error, it still seems a bit of a mess. If you allow mypy to follow imports, then the violations get duplicated several times, so the output is about 4 times longer than running mypy directly.

Additionally, I'm not sure if there is a setting I've changed, but I'm also seeing these: routes.py:1:1: T499 Success: no issues found in 1 source file Which is obviously not the right behaviour.

Dreamsorcerer avatar May 11 '20 18:05 Dreamsorcerer

I have found this plugin works with mypy 0.720 or below.

It would be great if this were fixed here though.

mjp4 avatar May 21 '20 16:05 mjp4