- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.9k
          add type stub for os.reload_environ
          #14938
        
          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
| According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 | 
sys.reload_environos.reload_environ
      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.
Thank you. It looks like the reason why we forgot to add this is that the CPython team forgot to add this function to __all__ when they added it. This then meant that our tests didn't flag it as missing from the module. (In general, if __all__ is defined in a module, our tests only complain if something is missing from the stub if that thing is included in __all__.)
Would you be interested in also making a PR to CPython to add "reload_environ" to os.__all__? Feel free to tag me on the PR and I can help get it merged
| @AlexWaygood Should I do this to the other recent typeshed missing stubs as well? | 
| 
 I think this is the only one where the reason why it wasn't picked up by our tests was that it wasn't included in  
 | 
| What about  | 
| Good point! Yep, that one should also probably be added to  | 
| @guoci how did you find these, out of interest? | 
| @AlexWaygood I wrote a script that matches the CPython reStructuredText documentation against the typeshed type stubs. My goal is to automate the process of integrating typeshed’s type information into the CPython docs. | 
| Very cool -- you could consider contributing something like that script to stubtest, which is the tool we use in our CI to detect when something is present at runtime but not present in the stub. If something appears in CPython's documentation, that's a pretty good reason to make sure we include it in the stubs. We could probably make sure all objects that are explicitly documented are included in this set here as things that should always be included in the stubs. | 
| Sure! | 
No description provided.