com4 / flymake-mypy

flymake checker for mypy
BSD 2-Clause "Simplified" License
0 stars 2 forks source link

flymake not respecting Mypy's `exclude` config #3

Open fast-90 opened 1 week ago

fast-90 commented 1 week ago

Hello, I'm back again with a question :)

On one of my projects I am excluding some file names/paths from mypy, in particular we don't want to run mypy on our tests. I have it set up in our pyproject.toml and the exclusion works when running mypy from the command line, however flymake still complains about mypy issues:

image

I know it does recognise my pyproject.toml because it picks up other configurations (e.g. strict), just not the exclude config.

I initially thought it was because the temporary file used for mypy does not comply the regex from the exclude config, hence I changed the code in a fork I created, but it still does not work (the above screenshot was made whilst using my fork of flymake-mypy.

Do you know what could be the issue, and how I could fix it so that it respects the exclude config from pyproject.toml.

As always, many thanks for this great package :).

Duy-X commented 1 week ago

I just figured out this is just how mypy works if you check single file: https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-exclude

I am still wondering if there is any way to make it respect the exclude setting though.