Ref<PyType> (@NotNull PyNamedParameter param, @NotNull PyFunction func, @NotNull TypeEvalContext context) { StructuredDocString docString = func.getStructuredDocString(); if (docString == null) { final PyClass pyClass = PyUtil.turnConstructorIntoClass(func); if (pyClass != null) { docString = pyClass.getStructuredDocString(); } } if (docString != null) { final String typeText = docString.getParamType(param.getName()); if (StringUtil.isNotEmpty(typeText)) { final Ref<PyType> typeRef = parseType(func, typeText, context); if (param.isPositionalContainer()) { return Ref.create(PyTypeUtil.toPositionalContainerType(param, typeRef.get())); } if (param.isKeywordContainer()) { return Ref.create(PyTypeUtil.toKeywordContainerType(param, typeRef.get())); } return typeRef; } } return null; }