-
-
Notifications
You must be signed in to change notification settings - Fork 386
Ship attrs mypy plugin ourselves #421
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
Comments
I don't think there is anything that should block this. It might take some careful extraction, and it will require people to point to |
Yep, my PR for externally configured mypy plugins got merged! Thanks @ethanhs for the quick review. Here are a few questions and complicating factors, off the top of my head:
|
If we do go the separate package route, it should probably be
It is not, mypy does not depend on attrs (except for tests around this).
I'm still working on it, but I am getting happier with the pytest plugin I am writing for data driven test cases. I'm hoping to spend some time on it this week. |
discussion moved to #480 |
I'm reopening this issue so we can discuss moving the plugin into attrs. Previously I said:
However my PR python/mypy#9396 has been sitting there unreviewed for 2 months now. Note: They aren't ignoring me. They are just overwhelmed with work and not enough people. So I think it might be best if we don't depend on their PRs. Note it would make mypy and attrs no longer plug and play. You'd have to install mypy and attrs and then edit your mypy.ini to tell it about the plugin. Another option is to ship the plugin and stubs in a separate package. |
Yeah I'm sure they got hit quite hard by Dropbox switching incrementally away from Python. And I mean we have access to all relevant plugin devs here too… What would be the upside of an own package? I really feel like CalVer and potentially frequent releases go great with integrating the plugin? |
I'm not sure why other projects go with using a separate package. Maybe it's to not have code that a user won't actually use. But I'm ok if it's all bundled together. |
I also think that would make stuff just more brittle and confusing. This way we get “here’s attrs 20.x, and that’s all there is to it”. |
What about packages that build on attrs but add their own wrappers for |
I use that myself all the time so failing that functionality would be a no-go. :) |
Doing a bit of research of how to bring the tests over. It looks like sqlalchemy-stubs does this: I'll see if porting that over to our system is easy. Also any problem with the licenses in bringing the plugin code from mypy to here? I can't imagine, but I'm pretty noob on open source development. |
Didn't you literally write it? |
(Once you open the PR on the attrs repo, we can ask the other contributors for permission. mypy is MIT so it would be probably fine to add a header but I'd like to prevent licensing inconsistencies) |
I did write most of it, but others have contributed fixes and patches. |
I don’t know how far this is aspirational, but python/mypy#3916 gives me some hope?
The text was updated successfully, but these errors were encountered: