-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --plugins command-line option #11667
Comments
This might be problematic, because, for example, our plugin (mypy-django) requires extra configuration in |
That is true, however, configuration can also often be injected when necessary (see for example typeddjango/django-stubs#764 (comment) for one possibility with mypy-django). Also, configuration for "optional" plugins can still be kept in |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Running into this issue right now where I want to specify a plugin in mypy.api.run, but it's not recognized. |
Any work in this direction? I want to write tests with custom plugin options and this would be super helpful |
PR welcome! |
Feature
It seems that currently the only way to make mypy load a plugin is to add it to the configuration file as
plugins = ...
. I would love if it would be possible to invoke mypy in the command line with or without a given plugin enabled. For example:Pitch
The main benefit of this feature is that it would allow us to dynamically load plugins when invoking mypy using
mypy.api.run
or when invoking mypy using the command line. Currently it is difficult to programmatically "inject" a plugin into a mypy run, this change would make this much easier.The text was updated successfully, but these errors were encountered: