pyre-check
pyre-check copied to clipboard
Support `__path__` in packages
Pyre Bug
Bug description This is the same problem that mypy just fixed, https://github.com/python/mypy/issues/1422
Reproduction steps
__all__ = get_all_submodules(__path__)
This line produces pyre-check error:
dschemas/__init__.py:8:29 Unbound name [10]: Name `__path__` is used but not defined in the current scope.
Expected behavior
The __path__
symbol should be recognized as an Iiterable producing strings, according to https://docs.python.org/3/reference/import.html#path__.
Hi @jiridanek, thanks for the report. I have opened an issue in our internal tracker at Meta.