-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
lowercase list and dict in the rest of stdlib #5892
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
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
def get_exec_path(env: Mapping[str, str] | None = ...) -> List[str]: ... | ||
|
||
# NOTE: get_exec_path(): returns List[bytes] when env not None | ||
def get_exec_path(env: Mapping[str, str] | None = ...) -> list[str]: ... |
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.
Was the comment wrong? Sounds like something we should handle with overloads.
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.
I tried get_exec_path()
, get_exec_path(None)
, get_exec_path(os.environ)
and get_exec_path(os.environb)
. They all returned a list of strings. I also don't think this is different on windows, because windows generally uses byte strings less than unixy operating systems.
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 checking! Maybe it was a Python 2 thing.
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.
That's what I thought too, but the function doesn't exist in Python 2. I also tried git blame
, but that leads to 337abed which copies stubs from a different repo and gives no more history.
Skipped in #5888