Don't propose to add methods or fields to builtin classes.

This commit is contained in:
Dmitry Cheryasov
2009-10-26 08:44:30 +02:00
parent 051a1d41c7
commit 05490834eb
@@ -300,7 +300,7 @@ public class PyUnresolvedReferencesInspection extends LocalInspectionTool {
}
if (qtype instanceof PyClassType) {
PyClass cls = ((PyClassType)qtype).getPyClass();
if (cls != null) {
if (cls != null && ! PyBuiltinCache.hasInBuiltins(cls)) {
if (reference.getElement().getParent() instanceof PyCallExpression) {
actions.add(new AddMethodQuickFix(ref_text, cls));
}