-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Lots of stub fixes #15
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
Conversation
Note: with the |
Thanks for the PR! Your changes look good (a few minor comments above). Changing |
It doesn't need to wait, because a I have IMHO the right level of balance is: while typeshed should have consideration for implementations, it shouldn't make itself wrong for them. |
I haven't rebased this yet because I'm still investigating a proper fix for the "don't export unless" |
If I don't finish this in an hour, I probably won't until Monday. I discovered that mypy does have a |
No hurry, I won't get around to testing this PR with mypy before Monday, as well. WRT |
A symlink is not enough, since that will result in duplicate definitions if anybody explicitly imports it. I'll use the (working) glob import though. |
Switching from my versions of I have addressed all of the review comments now except for the There's actually already a bug: python/typing#112 |
Note, the hang you experienced is a result of creating a |
FYI, mypy should now deal with |
This fixes a lot of stubs so that they actually typecheck.
The only thing I didn't fix was sqlalchemy, for which I filed #14
Of note:
__builtin__
so that other code can import it.types
instead ofAny
or nonexistent names likebuiltins.module
.Tuple[T]
(fixed-length) and also some other sequences.Any
and unparameterized containers that I happened to see while applying other updates.builtins
does not export typing names. There was a comment that implied that imported names were not reexported, but that is not what current tooling actually does, and there were several stubs as well as real-world code that used names likeList
andDict
without importing them.What I did not do:
bytearray
and other buffer cases).raise FooError
code that I don't think belongs in stubs (and which is certainly incomplete, if not inaccurate, if it is intended to enumerate all the possible exceptions).