pyanalyze icon indicating copy to clipboard operation
pyanalyze copied to clipboard

`import_failed` false positive with relative imports

Open mflova opened this issue 1 year ago • 1 comments

Given the following mock project:

root/
└── lib/
    ├── a.py
    └── b.py
# a.py
# Empty
# b.py
import a

For this example I can perfectly run b.py from both root/ or from lib/. However, when I launch pyanalyze from root/, I get import_failed code. Apparently, because it cannot import a from b.py

mflova avatar Oct 10 '23 14:10 mflova