Skip to content

Python modules without __init__.py failed to be parsed since 2.5.0 #3528

@nicocti

Description

@nicocti

Pylint 2.5 fails to parse modules without init.py while 2.4.4 works fine.
I found nothing in the changelog regarding this, so I guess it's a bug.

Steps to reproduce

  1. create a python module without init.py
  2. run pylint --disable=C,R ${MODULE_NAME}

Current behavior

raises:

************* Module ${MODULE_NAME}
${MODULE_NAME}/__init__.py:1:0: F0010: error while code parsing: Unable to load file ${MODULE_NAME}/__init__.py:
[Errno 2] No such file or directory: '${MODULE_NAME}/__init__.py' (parse-error)

Expected behavior

No error expected since init.py are optional since python 3.4+

pylint --version output

pylint==2.5.0
python==3.6.10

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions