We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c45570 commit 774d91bCopy full SHA for 774d91b
pylint_django/transforms/__init__.py
@@ -26,7 +26,11 @@ def set_fake_locals(module):
26
if module.name != package_name:
27
return
28
for class_name in class_names:
29
- module._locals[class_name] = fake._locals[class_name] # pylint: disable=protected-access
+ # This changed from locals to _locals between astroid 1.3 and 1.4
30
+ if hasattr(module, '_locals'):
31
+ module._locals[class_name] = fake._locals[class_name] # pylint: disable=protected-access
32
+ else:
33
+ module.locals[class_name] = fake.locals[class_name]
34
35
MANAGER.register_transform(nodes.Module, set_fake_locals)
36
0 commit comments