Skip to content

Add --plugins command-line option #11667

Open
@GergelyKalmar

Description

@GergelyKalmar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions