Describe the Bug
pyrefly reports an unused-import warning for the following implicit re-export:
from math import tau as tau
The other type-checkers don't, because the convention (it might even be a typing spec thing) is to treat import {name} as {name} as a re-export, i.e. {name} should be a public symbol in that module.
See https://github.com/scipy/scipy-stubs/blob/4b2ee9a7a917ebd8918caf1ab51146ba4898a34b/scipy-stubs/_lib/_array_api_compat_vendor.pyi for a real-world example of this (at runtime there is no __all__).
Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAENqALgBZ0Q3G6VN1OoBXOqjh9BAHXQgAvgBoQqAMZMIANxgAxaDAposeImRlA
(Only applicable for extension issues) IDE Information
No response
Describe the Bug
pyrefly reports an
unused-importwarning for the following implicit re-export:The other type-checkers don't, because the convention (it might even be a typing spec thing) is to treat
import {name} as {name}as a re-export, i.e.{name}should be a public symbol in that module.See https://github.com/scipy/scipy-stubs/blob/4b2ee9a7a917ebd8918caf1ab51146ba4898a34b/scipy-stubs/_lib/_array_api_compat_vendor.pyi for a real-world example of this (at runtime there is no
__all__).Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAENqALgBZ0Q3G6VN1OoBXOqjh9BAHXQgAvgBoQqAMZMIANxgAxaDAposeImRlA
(Only applicable for extension issues) IDE Information
No response