Add --plugins command-line option
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
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:
mypy --plugins=mypy_django_plugin.main,other_plugin:custom_entry_point ...
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing mypy's command-line handling, the configuration-file plugins setting, and the mypy.api.run entry point mentioned in the issue. Determine how a --plugins value could enable the listed plugin entry points in both command-line and API runs, then verify that invocation with and without plugins behaves as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100