Skip to content

There are no tests for mypy.plugins.proper_plugin #19890

@wyattscarpenter

Description

@wyattscarpenter

There don't seem to be any tests for mypy.plugins.proper_plugin, which was manually tested for its addition in #16036.

Since mypy apparently owns this code, we should test it.

I've figured out this works as a unit test except that we can't import mypy.types in a unit test.

[case properPlugin]
# flags: --config=tmp/foo.ini
from mypy.types import Type, CallableType
result: Type | None = None
isinstance(result, CallableType)                      
[file foo.ini]
\[mypy]
plugins=mypy.plugins.proper_plugin
[builtins fixtures/isinstancelist.pyi]

I've recently realized this plugin parents its notes wrong, so I'd like to include a regression test for that, but I am having a hard time figuring out how to trigger it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions