Describe the Bug
Minimal repro:
# foo/__init__.py
a: int = 0
__all__ = [x for x in ["a"]]
# [test.py](http://test.py/)
from foo import *
print(a) # Pyrefly FP: this should be findable
I think it's reasonable to emit a warning if __all__ is unresolvable statically (as warnings -- Pyright does this). But Pyrefly currently treats this in the same way as if __all__ = [] which is clearly problematic.
Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAEYuudENxulALnQFQA66AcUoR0nABSoAlCAA0IMpRhgopQp1pQKAYjoAFUkpWk6aLHnx0AxrnSQA5gFdKqThFuEBugMowYdAAtOTmI4RAB6cMVlVUIOe3CYdHDMXCs4cJs7CCcXN1twhg46VAA3VGhUbFhrWwdnV3d0OlxifPQ4T3QyTgDbAFpSmEo4JroAXjo%2BEABmQgBGACZpgTlwJnCAfU3RCE5tknJEEFREFjEJugAGAQFt1CgobcuAbUtGSjpLUSmT6YBdEAAX3kqCsbiGADFoDAKGYcARDsCgA
Describe the Bug
Minimal repro:
I think it's reasonable to emit a warning if
__all__is unresolvable statically (as warnings -- Pyright does this). But Pyrefly currently treats this in the same way as if__all__ = []which is clearly problematic.Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAEYuudENxulALnQFQA66AcUoR0nABSoAlCAA0IMpRhgopQp1pQKAYjoAFUkpWk6aLHnx0AxrnSQA5gFdKqThFuEBugMowYdAAtOTmI4RAB6cMVlVUIOe3CYdHDMXCs4cJs7CCcXN1twhg46VAA3VGhUbFhrWwdnV3d0OlxifPQ4T3QyTgDbAFpSmEo4JroAXjo%2BEABmQgBGACZpgTlwJnCAfU3RCE5tknJEEFREFjEJugAGAQFt1CgobcuAbUtGSjpLUSmT6YBdEAAX3kqCsbiGADFoDAKGYcARDsCgA