typing_copilot icon indicating copy to clipboard operation
typing_copilot copied to clipboard

support plugins eg django-stubs' mypy_django_plugin

Open graingert opened this issue 4 years ago • 2 comments

currently the LAX_BASELINE_MYPY_CONFIG doesn't include any plugins, it would be useful if we could load the plugins set in the mypi.ini or pass them to typing-copilot

example_project/polls/models.py:204: error: Need type annotation for 'translation'  [var-annotated]
Found 32 errors in 1 file (checked 230 source files)

Since these errors happen at mypy's most permissive settings, they cannot be suppressed. Please resolve them, then run this command again.

graingert avatar Jan 29 '21 09:01 graingert

Hi @graingert, thanks for opening this issue! I knew this would come up and it's a use case I'd love to support. Up until now, I didn't have a project that uses plugins to test with and I've never needed plugins myself so I wasn't sure how to move forward.

Is your project available on GitHub so I can clone it and use it for testing? If not, do you know of a suitable project that requires plugins I could use to develop this functionality?

Also, is there a good way to know if plugins could be useful in a project? E.g. imagine a project that doesn't use mypy at all yet — could typing_copilot recognize the need for plugins and suggest that their installation would resolve some of the issues that were found?

obi1kenobi avatar Jan 29 '21 16:01 obi1kenobi

Also, is there a good way to know if plugins could be useful in a project

You could probably use pipeqs to find _stubs versions of packages

graingert avatar Jan 29 '21 16:01 graingert