You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most files are empty, the only meaningful contents is in:
c:\temp_cleared_each_night>type subpackage1\main.py
pass
c:\temp_cleared_each_night>type subpackage2\main.py
import supplementary
from unittest import TestCase
class TestClass(TestCase):
def test_method(self):
print("Name of the test: {}".format(supplementary.SINGLE_CONN_CONFIG_IOT))
c:\temp_cleared_each_night>type subpackage2\supplementary.py
SINGLE_CONN_CONFIG_IOT = {
}
The idea is that subpackage1 is independent from subpackage2.
Yet, when I execute:
pylint subpackage1\main.py subpackage2\main.py
I get incorrect warning:
E: 6,44: Module 'supplementary' has no 'SINGLE_CONN_CONFIG_IOT' member (no-member)
When I reverse arguments order, everything is fine:
pylint subpackage2\main.py subpackage1\main.py
The warning is invalid, because subpackage1 doesn't want to utilize this constant and doesn't have it defined. subpackage2 does want to use it (but it has it defined).
I believe that imported supplementary.py from subpackage1 is not reanalyzed in subpackage2.
I've tried to debug it in pylint and astroid, but to no avail.
I've tried to clean up astroid cache (MANAGER.clear_cache()) with no effect.
Observed on pylint 1.8, 1.9.4, Windows, Python 2.7.15.
Is there a workaround I could apply or any fix for that?
Regards,
Robert
The text was updated successfully, but these errors were encountered:
Hi @robgom Thanks for reporting the issue. We are aware of this bug, it's currently being tracked under #689. I'm closing this one as a duplicate, but feel free to subscribe to the other one for notifications.
There's a no-member warning generated when I run
pylint file1.py file2.py
, but not whenpylint file2.py file1.py
. The warning is incorrect, I believe.I have the following structure:
Most files are empty, the only meaningful contents is in:
The idea is that subpackage1 is independent from subpackage2.
Yet, when I execute:
I get incorrect warning:
When I reverse arguments order, everything is fine:
The warning is invalid, because subpackage1 doesn't want to utilize this constant and doesn't have it defined. subpackage2 does want to use it (but it has it defined).
I believe that imported supplementary.py from subpackage1 is not reanalyzed in subpackage2.
I've tried to debug it in pylint and astroid, but to no avail.
I've tried to clean up astroid cache (MANAGER.clear_cache()) with no effect.
Observed on pylint 1.8, 1.9.4, Windows, Python 2.7.15.
Is there a workaround I could apply or any fix for that?
Regards,
Robert
The text was updated successfully, but these errors were encountered: