From 02913b8908c6d39ff33c0addfeb230e3cf637635 Mon Sep 17 00:00:00 2001 From: "Ilya.Kazakevich" Date: Wed, 17 Feb 2016 17:02:24 +0300 Subject: [PATCH] Django forms and formset fix: PyCollectionTypeImpl fix return type to support myElementsTypes --- .../jetbrains/python/psi/types/PyCollectionTypeImpl.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/src/com/jetbrains/python/psi/types/PyCollectionTypeImpl.java b/python/src/com/jetbrains/python/psi/types/PyCollectionTypeImpl.java index 8e6b315eb866..e89d85dab256 100644 --- a/python/src/com/jetbrains/python/psi/types/PyCollectionTypeImpl.java +++ b/python/src/com/jetbrains/python/psi/types/PyCollectionTypeImpl.java @@ -16,6 +16,7 @@ package com.jetbrains.python.psi.types; import com.intellij.psi.PsiElement; +import com.jetbrains.python.psi.PyCallSiteExpression; import com.jetbrains.python.psi.PyClass; import com.jetbrains.python.psi.PyPsiFacade; import org.jetbrains.annotations.NotNull; @@ -44,6 +45,12 @@ public class PyCollectionTypeImpl extends PyClassTypeImpl implements PyCollectio return null; } + @Nullable + @Override + public PyType getCallType(@NotNull final TypeEvalContext context, @Nullable final PyCallSiteExpression callSite) { + return getReturnType(context); + } + @NotNull @Override public List getElementTypes(@NotNull TypeEvalContext context) {