internal override bool IsOfType(IAnalysisSet klass) { if (_original == null) { return(false); } return(_original.IsOfType(klass)); }
public override IAnalysisSet GetDescriptor(Node node, AnalysisValue instance, AnalysisValue context, AnalysisUnit unit) { if (_function.IsStatic || instance.IsOfType(ProjectState.ClassInfos[BuiltinTypeId.NoneType])) { return(base.GetDescriptor(node, instance, context, unit)); } else if (_method == null) { _method = new BuiltinMethodInfo(_function, PythonMemberType.Method, ProjectState); } return(_method.GetDescriptor(node, instance, context, unit)); }
private BuiltinTypeId GetTypeId(AnalysisValue v) { if (v.TypeId != BuiltinTypeId.Type) { return(v.TypeId); } if (v.MemberType == PythonMemberType.Instance && v.IsOfType(_analysis.ProjectState.ClassInfos[BuiltinTypeId.Type])) { return(BuiltinTypeId.Type); } return(BuiltinTypeId.Unknown); }