Ref<PyType> (@NotNull final PyNamedParameter param, @NotNull final PyFunction func, @NotNull TypeEvalContext context) { if (!(param.getParent() instanceof PyParameterList)) return null; List<PyNamedParameter> params = ParamHelper.collectNamedParameters((PyParameterList) param.getParent()); final int index = params.indexOf(param); if (index < 0) return null; final List<PyType> superMethodParameterTypes = new ArrayList<>(); PySuperMethodsSearch.search(func, context).forEach(psiElement -> { if (psiElement instanceof PsiMethod method) { final PsiParameter[] psiParameters = method.getParameterList().getParameters(); int javaIndex = method.hasModifierProperty(PsiModifier.STATIC) ? index : index-1; // adjust for 'self' parameter if (javaIndex < psiParameters.length) { PsiType paramType = psiParameters [javaIndex].getType(); if (paramType instanceof PsiClassType) { final PsiClass psiClass = ((PsiClassType)paramType).resolve(); if (psiClass != null) { superMethodParameterTypes.add(new PyJavaClassType(psiClass, false)); } } } } return true; }); if (superMethodParameterTypes.size() > 0) { final PyType type = superMethodParameterTypes.get(0); if (type != null) { return Ref.create(type); } } return null; }