-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add wurlitzer
stubs
#11459
Add wurlitzer
stubs
#11459
Conversation
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5e9fca9
to
21be2e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, though I haven't looked in-depth at the stderr
/stdout
annotations. Usually we prefer to defined protocols for that kind of thing rather than mandating that an object has to be an instance of io.IOBase
. Usually that isn't necessary and duck-typing will do.
Co-authored-by: Alex Waygood <[email protected]>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Alex Waygood <[email protected]>
Thanks for the (very fast 😮 ) review, I'll look into using protocols. Edit: looks like some overloads will be required to get precise return types, I'm passing this PR back into draft mode for now. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d577d5b
to
80f410c
Compare
@AlexWaygood Do you know what in the overloads is causing the CI to fail ? |
This comment has been minimized.
This comment has been minimized.
The error looks like a bug in stubtest, but you can probably work around it by not using overloaded context managers. Instead of |
Yeah, @Akuli is right. Stubtest in general isn't great at dealing with several decorators on a single function -- see python/mypy#14950 (which is now fixed, but was only fixed by special-casing |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@AlexWaygood If you have time to review the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! Typing is hard :)
Co-authored-by: Akuli <[email protected]>
Co-authored-by: Akuli <[email protected]>
Co-authored-by: Akuli <[email protected]>
Co-authored-by: Akuli <[email protected]>
Co-authored-by: Akuli <[email protected]>
Co-authored-by: Akuli <[email protected]>
@Akuli Thanks for the improvements/fixes! |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR adds stubs for the wurlitzer package.