Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test case showing we can shadow
builtins.pyi
Summary: We discovered recently that a user's buck target can accidentally shadow builtin stubs, because user modules always take priority and users can set `base_module = ''` with an `__init__.py`. In general this behavior of allowing user files to shadow stdlib isn't so bad - as a rule they won't, and it allows users to define a custom typeshed. But for `builtins.pyi` sepecifically this is especially confusing because the errors are extremely widespread and it's pretty hard to guess what is happening since the empty qualifier is special. So, to prevent a repeat of the debugging session we had we want to special-case that `builtins.pyi` cannot be shadowed. This commit adds a new test illustrating the issue, the next commit will cut Pyre over to preferring `builtins.py` Reviewed By: rchen152 Differential Revision: D65076555 fbshipit-source-id: c9b6138a2724b5eae4eec2836bd3707d7d517519
- Loading branch information