Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit b767c51

Browse files
committed
mark abstract functions as such
1 parent 13448bb commit b767c51

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/Analysis/Engine/Impl/Analyzer/FunctionAnalysisUnit.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,21 @@ private bool ProcessAbstractDecorators(IAnalysisSet decorator) {
109109
switch (d.Name) {
110110
case "abstractmethod":
111111
res = true;
112+
Function.IsAbstract = true;
112113
break;
113114
case "abstractstaticmethod":
114115
Function.IsStatic = true;
116+
Function.IsAbstract = true;
115117
res = true;
116118
break;
117119
case "abstractclassmethod":
118120
Function.IsClassMethod = true;
121+
Function.IsAbstract = true;
119122
res = true;
120123
break;
121124
case "abstractproperty":
122125
Function.IsProperty = true;
126+
Function.IsAbstract = true;
123127
res = true;
124128
break;
125129
}

src/Analysis/Engine/Impl/Values/Definitions/IFunctionInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public interface IFunctionInfo: IAnalysisValue {
2323
bool IsClassMethod { get; }
2424
bool IsProperty { get; }
2525
bool IsClosure { get; }
26+
bool IsAbstract { get; }
2627
IPythonProjectEntry ProjectEntry { get; }
2728
}
2829
}

src/Analysis/Engine/Impl/Values/FunctionInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ private static bool CanBeClosure(PythonAnalyzer state, IPythonProjectEntry entry
8484
public bool IsStatic { get; set; }
8585
public bool IsClassMethod { get; set; }
8686
public bool IsProperty { get; set; }
87+
public bool IsAbstract { get; internal set; }
8788
public bool IsClosure => _callsWithClosure != null;
8889

8990
public override IAnalysisSet Call(Node node, AnalysisUnit unit, IAnalysisSet[] args, NameExpression[] keywordArgNames) {

0 commit comments

Comments
 (0)