-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
Should we remove the stubs from typeshed
?
#480
Comments
The only down side I see with this is that other type checkers do not support PEP 561 yet. PyCharm has support for it now, but both pytype and pyre do not. Otherwise, I think this would simplify things nicely. If stubs are pulled out of typeshed, perhaps it also makes sense to move the attrs mypy plugin into the attrs source tree as well? |
I guess this comes ultimately down to mypy’s devs decision. I’m of course all for cleaning stuff up. |
I'm hesitant to move the plugin into just attrs because that way they run our tests and a breaking change will have to be fixed before it gets merged into mypy. @hynek I'm not sure what you mean by "mypy devs decision". That being said I've made a PR on typeshed to update the stubs. I think we should probably wait until pytype and pyre support Pep 561. |
I meant that whether or not the stubs are removed isn’t/shouldn’t be our decision. 🤷♂️ If it weren’t for pytype/pyre I’d even argue to not update those stubs at all since they’d be used by people who run older attrs. |
In general, I think this is a good idea in long term perspective. Having a single package that incorporates PEP 561 stubs and a mypy plugin is a simple way to keep all three in sync. A possible downside is that we need to be sure that the plugin works well with more than one mypy version, since currently plugins API is quickly changing. Also if we are going to do this, we will also need to migrate the open issues. |
Since the big moment of starting to work on @euresti since you basically wrote the plugin, what is your current position? Could be pull this off? |
There are 2 pieces:
B) plugin
|
Thanks for your thoughts! TBH, I don't think about stubs at all anymore. We're shipping them forever and I don't see it as my job to keep others updated. As for the plugin, I'm gonna 100% follow your recommendations here because I'm not able to maintain it. If at some point someone steps up and want to take ownership of it, we can talk again but I guess that matter is settled for now. |
So on the question of the stubs. Should I make a PR to remove them from |
I honestly don't care. I'd leave that to the mypy devs since it doesn't affect us. If someone wants to volunteer and keep our stubs synced that's cool too. I just don't want to see any tickets on our tracker. |
I would say yes to removing them from |
Now that
mypy
supports pep 561 (python/mypy#4693) andattrs
includes type stubs (#238) should we remove the type annotations that are intypeshed
? This way we don't have to keep those in sync withattrs
development.The text was updated successfully, but these errors were encountered: