-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Labels
importsModule resolution, site-packages discovery, import-related diagnosticsModule resolution, site-packages discovery, import-related diagnostics
Description
Summary
here the module package.b
is loaded via an import in another module, mypy supports this feature, pyright does not, what do you think?
my-app/
├─ package/
│ ├─ b.py
│ ├─ __init__.py
├─ main.py
├─ mod.py
# main.py
import package
import mod
reveal_type(package.b)
# ty: Type `<module 'package'>` has no attribute `b`
# mypy: "types.ModuleType"
# runtime: `package.b`
# mod.py
import package.b
Version
No response
Metadata
Metadata
Assignees
Labels
importsModule resolution, site-packages discovery, import-related diagnosticsModule resolution, site-packages discovery, import-related diagnostics