-
-
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 _file in class SpooledTemporaryFile in tempfile.pyi #10327
Conversation
This comment has been minimized.
This comment has been minimized.
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.
This was trickier than I thought, but I figured it out :)
Co-authored-by: Akuli <[email protected]>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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!
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
@Dr-Irv This is a draft PR that attempts to close #10286
I have _file attribute in class SpooledTemporaryFile using hints given by @Akuli in #10286
So, please provide feedback and let me know if there are any changes to make.
On further looking into documentation I found that there can also be a true file object that needs to be returned depending on whether rollover() has been called
I can add it later once I get feedback or might make another PR if required.
P.S. I ran the tests before making a PR and it was all good. But they are failing here for some reason.