lowercase list and dict in the rest of stdlib - #5892
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.
Was the comment wrong? Sounds like something we should handle with overloads.
There was a problem hiding this comment.
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.
Thanks for checking! Maybe it was a Python 2 thing.
There was a problem hiding this comment.
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