Three tiny Python 3 files are required:
Empty
__init__.py
main.py
with one line:config = "data"
sub.py
with one line:import main; print(main.config)
python3 sub.py
(and also python2) prints the word data
as expected, but pylint warns when checking sub.py
:
E: 1,20: Module 'main' has no 'config' member (no-member)
I have no explanation for it.