There are no tests for mypy.plugins.proper_plugin
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
There don't seem to be any tests for mypy.plugins.proper_plugin, which was manually tested for its addition in https://github.com/python/mypy/pull/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.
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 with mypy.plugins.proper_plugin and the supplied unit-test case, then investigate how to trigger the incorrectly parented notes behavior. Confirm how the mypy.types import limitation affects the test setup, and consider the work done when tests cover the plugin and the regression scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100