pyrefly icon indicating copy to clipboard operation
pyrefly copied to clipboard

implicit-import false positive when "import pkg.sub as _" comes before "import pkg as alias"

Open shahhamdihassan opened this issue 1 month ago • 3 comments

Split out from #5193. When the submodule is imported under a throwaway name before the parent is imported under an alias, using the submodule through the alias still reports implicit-import (sandbox):

import xml.dom as _
import xml as x

x.dom  # implicit-import reported here

The other order (import xml as x then import xml.dom) is fixed on main.

shahhamdihassan avatar Nov 02 '26 15:11 shahhamdihassan

This issue has someone assigned, but has not had recent activity for more than 2 weeks.

If you are still working on this issue, please add a comment so everyone knows. Otherwise, please comment #unclaim to unassign yourself.

Thank you for your contributions!

github-actions[bot] avatar Nov 28 '26 00:11 github-actions[bot]

#claim

shahhamdihassan avatar Dec 02 '26 21:12 shahhamdihassan

@shahhamdihassan this issue is already assigned to you. Have at it! 🚀

github-actions[bot] avatar Dec 02 '26 21:12 github-actions[bot]