Пример #1
0
 public SequenceBuiltinClassInfo(IPythonType classObj, PythonAnalyzer projectState)
     : base(classObj, projectState) {
     var seqType = classObj as IPythonSequenceType;
     if (seqType != null && seqType.IndexTypes != null) {
         _indexTypes = projectState.GetAnalysisSetFromObjects(seqType.IndexTypes).GetInstanceType();
     } else {
         _indexTypes = AnalysisSet.Empty;
     }
 }
Пример #2
0
        public SequenceBuiltinClassInfo(IPythonType classObj, PythonAnalyzer projectState)
            : base(classObj, projectState)
        {
            var seqType = classObj as IPythonSequenceType;

            if (seqType != null && seqType.IndexTypes != null)
            {
                _indexTypes = projectState.GetAnalysisSetFromObjects(seqType.IndexTypes).GetInstanceType();
            }
            else
            {
                _indexTypes = AnalysisSet.Empty;
            }
        }
Пример #3
0
 internal static IAnalysisSet GetReturnTypes(IPythonFunction func, PythonAnalyzer projectState)
 {
     return(AnalysisSet.UnionAll(func.Overloads
                                 .Where(fn => fn.ReturnType != null)
                                 .Select(fn => projectState.GetAnalysisSetFromObjects(fn.ReturnType))));
 }