From 3c1c2ff832aa0da48763566465971ef99b4f7612 Mon Sep 17 00:00:00 2001 From: Semyon Proshev Date: Wed, 9 Mar 2016 19:04:14 +0300 Subject: [PATCH] Drop PyClassTypeImpl#getPossibleInstanceMembers and its usages as useless and not modified since 2008 --- .../PyUnresolvedReferencesInspection.java | 8 +------- .../jetbrains/python/psi/types/PyClassTypeImpl.java | 13 ------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/python/src/com/jetbrains/python/inspections/unresolvedReference/PyUnresolvedReferencesInspection.java b/python/src/com/jetbrains/python/inspections/unresolvedReference/PyUnresolvedReferencesInspection.java index 326a27f643c3..e5cecb856ed0 100644 --- a/python/src/com/jetbrains/python/inspections/unresolvedReference/PyUnresolvedReferencesInspection.java +++ b/python/src/com/jetbrains/python/inspections/unresolvedReference/PyUnresolvedReferencesInspection.java @@ -500,13 +500,7 @@ public class PyUnresolvedReferencesInspection extends PyInspection { if (PyNames.COMPARISON_OPERATORS.contains(refName)) { return; } - if (expr.isQualified()) { - final PyClassTypeImpl object_type = (PyClassTypeImpl)PyBuiltinCache.getInstance(node).getObjectType(); - if ((object_type != null) && object_type.getPossibleInstanceMembers().contains(refName)) { - return; - } - } - else { + if (!expr.isQualified()) { if (PyUnreachableCodeInspection.hasAnyInterruptedControlFlowPaths(expr)) { return; } diff --git a/python/src/com/jetbrains/python/psi/types/PyClassTypeImpl.java b/python/src/com/jetbrains/python/psi/types/PyClassTypeImpl.java index 0ebe4ffea75f..3bda9b954c31 100644 --- a/python/src/com/jetbrains/python/psi/types/PyClassTypeImpl.java +++ b/python/src/com/jetbrains/python/psi/types/PyClassTypeImpl.java @@ -684,19 +684,6 @@ public class PyClassTypeImpl extends UserDataHolderBase implements PyClassType { } } - @NotNull - public Set getPossibleInstanceMembers() { - Set ret = new HashSet(); - /* - if (myClass != null) { - PyClassType otype = PyBuiltinCache.getInstance(myClass.getProject()).getObjectType(); - ret.addAll(otype.getPossibleInstanceMembers()); - } - */ - // TODO: add our own ideas here, e.g. from methods other than constructor - return Collections.unmodifiableSet(ret); - } - @Override public boolean equals(Object o) { if (this == o) return true;