mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Don't process qualified targets in PyRedeclarationInspection (PY-26591)
This commit is contained in:
@@ -79,7 +79,7 @@ public class PyRedeclarationInspection extends PyInspection {
|
||||
|
||||
@Override
|
||||
public void visitPyTargetExpression(final PyTargetExpression node) {
|
||||
if (PyNames.UNDERSCORE.equals(node.getText())) return;
|
||||
if (node.isQualified() || PyNames.UNDERSCORE.equals(node.getText())) return;
|
||||
final ScopeOwner owner = ScopeUtil.getScopeOwner(node);
|
||||
if (owner instanceof PyFile || owner instanceof PyClass) {
|
||||
processElement(node);
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
a = 10
|
||||
b = 10
|
||||
a.b = 10
|
||||
@@ -125,6 +125,11 @@ public class PyRedeclarationInspectionTest extends PyInspectionTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
// PY-26591
|
||||
public void testQualifiedTarget() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected Class<? extends PyInspection> getInspectionClass() {
|
||||
|
||||
Reference in New Issue
Block a user