-
-
Notifications
You must be signed in to change notification settings - Fork 2k
add os.__all__
#13052
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 os.__all__
#13052
Conversation
This covers darwin. Linux and win32 will need cleanup still.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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. 🤖🎉 |
Platform checks are preferable, in my opinion. Back in 2018, we didn't have |
Another messy
__all__. I tried to order the branches in a systematic way of increasing complexity: first version_info checks, then single platform and their versions, sorted alphabetically, then negative checks, then combinations, thenorstatements. No nesting the branches except where unavoidable (for complicatedand/orconditions).Side note, how are feeling about the precedent from #2286 to not use sys.platform checks on
os.O_*? Some of them are certainly correct to be that way, but I feel like it's a little silly to not use the check when we can be confident about it.