Hi Code Quality 

This may already be a reported bug, but then i need help in finding that issue. 


Situation: 
I invoke pylint with :

from pylint.lint import Run
...

files = [ 'subdir/a.py', 'b.py' ]

for file in files:
 status = Run(['-E'] +
                       ['--rcfile', 'pylintrc'] +
                         [file], exit=False)
## To keep separate records of each file

Problem: 
both files have this import
import  config.tc 
It runs well because the module config is in the sys.path when run. 

But pylint reports for subdir/a.py AND b.py
E: 16,0: No name 'tc' in module 'config'

If I revers the order of the files pylint reports OK for BOTH, probably because config.tc matches the path from root directory of b.py, and then when I check subdir/a.py, pylint somehow have a memory of the import. 

Run totally separately, only subdir/a.py reports problem with the import of config.tc


I don't want the order of the files to matter due to that pylint keeps a memory of the previous files imports and search paths. How do I clean out the imports between the files?  

--
Mats Hallingström
System Tester and python coder