No config file found, using default configuration
************* Module package.test
E: 1,29: Undefined variable 'module' (undefined-variable)
Expected behavior
No config file found, using default configuration
pylint --version output
No config file found, using default configuration
pylint 1.9.2,
astroid 1.6.5
Python 3.6.5 (default, Apr 4 2018, 15:01:18)
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]
I think what's going on is that normally package/module would not be imported and give a name error, but because it's imported in __init__, it's part of the package namespace. This is edge behaviour and probably not something that should be depended on in production.
Steps to reproduce
mkdir package
echo > package/module.py
echo "from .module import *" > package/__init__.py
echo "from package import *; print(module)" > package/test.py
pylint package --errors-only
Current behavior
Expected behavior
No config file found, using default configuration
pylint --version output
I think what's going on is that normally
package/module
would not be imported and give a name error, but because it's imported in__init__
, it's part of thepackage
namespace. This is edge behaviour and probably not something that should be depended on in production.