pyre-check icon indicating copy to clipboard operation
pyre-check copied to clipboard

Support `__path__` in packages

Open jiridanek opened this issue 3 years ago • 1 comments

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__.

jiridanek avatar Dec 22 '21 12:12 jiridanek

Hi @jiridanek, thanks for the report. I have opened an issue in our internal tracker at Meta.

arthaud avatar Jan 04 '22 18:01 arthaud