Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stubgen plugin support (via config file) #14428

Open
CarlosRDomin opened this issue Jan 11, 2023 · 5 comments · May be fixed by #14436
Open

stubgen plugin support (via config file) #14428

CarlosRDomin opened this issue Jan 11, 2023 · 5 comments · May be fixed by #14436
Labels
feature topic-plugins The plugin API and ideas for new plugins topic-stubgen

Comments

@CarlosRDomin
Copy link

Feature

Similar to #9193, I'd like to run stubgen with a custom plugin, and more generally, let stubgen take a config file

Pitch

stubgen is a really powerful tool (thanks devs for all the hard work!), but could become even more powerful by extending type support through custom plugins. Currently, there's no way (that I have found) to pass a configuration file (or at the very least extra_plugins to build) to stubgen, while !9203 exposed this option for stubtest.

The idea would be to implement a similar approach inside stubgen so we aren't forced to use the (much slower) interpreted version of mypy

@CarlosRDomin
Copy link
Author

CarlosRDomin commented Jan 12, 2023

Pushed an initial implementation, happy to take feedback on how to add a test for it. Alternatively, I'd be happy to just expose a way to pass extra_plugins to build if that's preferred given that not all options in the Mypy config file will be taken into account by stubgen

@CarlosRDomin
Copy link
Author

@AlexWaygood any feedback?

@AlexWaygood
Copy link
Member

AlexWaygood commented Feb 4, 2023

I'm afraid I've never touched stubgen, so I'm probably not the best reviewer, sorry! (I'm also not a maintainer, only a triager, so I wouldn't have the power to merge your PR either.)

The idea sounds reasonable, though!

@CarlosRDomin
Copy link
Author

Thanks for the feedback @AlexWaygood, apologies for tagging you then. Do you happen to know who'd be a maintainer/reviewer to get this merged eventually? Thanks!

@AlexWaygood
Copy link
Member

Possibly @hauntsaninja or @sobolevn if either of them has the time — but mypy is maintained by volunteers, so I can't make any promises :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature topic-plugins The plugin API and ideas for new plugins topic-stubgen
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants