Mypy requires some configuration in most cases, which it looks for in its working directory by default. You can check that flymake-collection-mypy won't work with projects like urllib3 at the moment. This updates flymake-collection-mypy to set default-directory to a parent dir containing a config file, if it exists. It also adds the mypy --shadow-file flag to make sure types are defined in the right module and caching works when processing temp files. Also includes minor tweaks to make flags customizable and parse out the diagnostic id.
Some things to consider:
Making setting the cwd opt-in, if it's important to preserve the current behavior
Adding a separate :working-dir keyword arg like flycheck instead of using :pre-let
I had to remove the leading dot from temp files, which appears to break relative imports. This will affect all checkers, but it could be made configurable per-checker
Mypy requires some configuration in most cases, which it looks for in its working directory by default. You can check that
flymake-collection-mypy
won't work with projects like urllib3 at the moment. This updatesflymake-collection-mypy
to setdefault-directory
to a parent dir containing a config file, if it exists. It also adds themypy --shadow-file
flag to make sure types are defined in the right module and caching works when processing temp files. Also includes minor tweaks to make flags customizable and parse out the diagnostic id.Some things to consider:
:working-dir
keyword arg like flycheck instead of using:pre-let