-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Added stub for user module #1454
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
Changes from 3 commits
4203d2b
5178f01
9f25b5e
9175257
9dc3ec6
2fd6a94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Stubs for user (Python 2) | ||
|
||
# Docs: https://docs.python.org/2/library/user.html | ||
# Source: https://hg.python.org/cpython/file/2.7/Lib/user.py | ||
from typing import BinaryIO, Text, Union | ||
|
||
|
||
home: str | ||
pythonrc: Union[bytes, Text] | ||
f: BinaryIO | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This may not exist (it will only exist if ~/.pythonrc.py exists). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JelleZijlstra How do we deal with variables that may or may not exist? Secondly is it okay if I include few more stubs in the same PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the module-level There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, please submit stubs for other modules as separate PRs. |
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.
Isn't it always bytes?
Uh oh!
There was an error while loading. Please reload this page.
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.
In this case yes, but it can return both in general.
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.
Well, in this case all the arguments are bytes, so the return will also be bytes.