msherry / flycheck-pycheckers

Multiple syntax checker for Python in Emacs, using Flycheck
GNU General Public License v3.0
63 stars 23 forks source link

Mypy setting "follow_import" is ignored #21

Closed kendriu closed 5 years ago

kendriu commented 6 years ago

My mypy.ini looks like

[mypy]
python_version = 3.6

[mypy-turbo.*]
follow_imports=skip

And .pycheckers

[DEFAULT]
max_line_length = 160
checkers=flake8, pylint, mypy3

mypy_config_file = /home/kendriu/sources/turbo/mypy.ini

The follow_imports seems to be ignored when pycheckers do it stuff.

Running mypy from command line works as expected (imports are ignored)

msherry commented 6 years ago

Thanks for the report! Can you please provide a little more information? What does the directory structure of the project that you are working in look like, and what specific file are you editing? If you can provide a minimal test case that reproduces the issue, it will make it easier to track down any problems. Thanks!

msherry commented 5 years ago

I can't reproduce this myself. Using a project with this layout:

msherry@msherry-mbp:/tmp/test_proj$ tree -a -I .git .
.
├── .pycheckers
├── main.py
└── mypy.ini

0 directories, 3 files

mypy.ini:

[mypy]
follow_imports = skip
ignore_missing_imports = True

.pycheckers:

[DEFAULT]
checkers = mypy2

mypy_config_file=mypy.ini

main.py:

import booga

booga.loo

I can cause flycheck-pycheckers to error on the first line by setting ignore_missing_imports = False, and suppress the error by setting it to True. This indicates to me that the mypy.ini itself is being respected, at least. If mypy is ignoring the setting, that sounds like it might be an issue with mypy itself. Without a more detailed repro, I'm going to close this out as unreproducible, but if you have a test case that reproduces the issue you're seeing, please reopen!