public static IEnumerable <BuiltinTypeId> GetTypeIdsByIndex(this IModuleAnalysis analysis, string exprText, int index)
        {
            return(analysis.GetValuesByIndex(exprText, index).Select(m => {
                if (m.PythonType.TypeId != BuiltinTypeId.Unknown)
                {
                    return m.PythonType.TypeId;
                }

                var state = analysis.ProjectState;
                if (m == state._noneInst)
                {
                    return BuiltinTypeId.NoneType;
                }

                var bci = m as BuiltinClassInfo;
                if (bci == null)
                {
                    var bii = m as BuiltinInstanceInfo;
                    if (bii != null)
                    {
                        bci = bii.ClassInfo;
                    }
                }
                if (bci != null)
                {
                    int count = (int)BuiltinTypeIdExtensions.LastTypeId;
                    for (int i = 1; i <= count; ++i)
                    {
                        var bti = (BuiltinTypeId)i;
                        if (!bti.IsVirtualId() && analysis.ProjectState.ClassInfos[bti] == bci)
                        {
                            return bti;
                        }
                    }
                }

                return BuiltinTypeId.Unknown;
            }));
        }
 public static IEnumerable <string> GetShortDescriptionsByIndex(this IModuleAnalysis entry, string variable, int index)
 {
     return(entry.GetValuesByIndex(variable, index).Select(m => m.ShortDescription));
 }
 public static IEnumerable <IPythonType> GetTypesByIndex(this IModuleAnalysis analysis, string exprText, int index)
 {
     return(analysis.GetValuesByIndex(exprText, index).Select(m => m.PythonType));
 }