Closed gmankab closed 1 month ago
Hey there @gmankab, no-site-packages
is not supported in the current mypy configuration in prospector. The way the config is working this way for a while without much change. To be easier to support an update mypy cli, the way options are implemented must change. The ideas you proposed sound like a fantastic way to start from.
This is somewhat related to #446. Would be nice to provide path to mypy.ini
and prospector would just pass that to the tool, this way prospector wouldn't necessarily have to implement config parsing for mypy
at all. Or just implement a generic parser to pass given flags to the tool as is just like @gmankab suggested.
The ideas you proposed sound like a fantastic way to start from
it`s great :)
There are many mypy options that are not handled by Propsector, should we use generic code to handle all the to mypy options?
I think that would make sense, I imagine it'd require finding those option values from mypy internals but a lot of prospector involves accessing private APIs. I didn't write this integration so I'm not completely sure how it works.
OK, when I have some time I will start some deeper investigations :-)
Fixed with #682
Describe the bug
Hello, here are some very important options in mypy linter, like
--ignore-missing-imports
and--no-site-packages
, prospector understands first one, but doesn't understand second one.To Reproduce
prospector_profile.yml
:main.py
:prospector command:
mypy command:
running mypy command without args gives two errors:
Adding first argument disables first error, and adding second argument disables second error.
But not with prospector.
If I commenting arguments for mypy in
prospector_profile.yml
:Then I getting same two errors. But if I uncommenting it, only second error disappears, while first error
Library stubs not installed for "requests"
still here.Expected behavior More universal way to specify arguments, for example:
or:
or:
Environment:
Additional context