Open
Description
Steps to reproduce
in an empty directory:
- file
a.py
:
def a():
print("a")
- file
b.py
import a
print(a.a())
- empty file
__init__.py
Current behavior
pylint b.py
b.py:1: [E0401(import-error), ] Unable to import 'a'
Expected behavior
no diagnostics
Important note
if you remove __init__.py
, the import-error
disappears.
pylint --version output
pylint 2.6.0
astroid 2.4.2
Python 3.9.1 (default, Dec 10 2020, 10:36:35)
[Clang 12.0.0 (clang-1200.0.32.27)]