There was an error while loading. Please reload this page.
1 parent 40da109 commit 012e138Copy full SHA for 012e138
1 file changed
python/ql/src/Statements/StatementNoEffect.ql
@@ -114,12 +114,18 @@ private Function getAnOverload() {
114
)
115
}
116
117
+private API::Node getATypedSubclass(API::Node base) {
118
+ // class Result(base, ...)
119
+ result = base.getASubclass()
120
+ or
121
+ // Result = base[...]
122
+ result = base.getASubscript()
123
+}
124
+
125
private ClassDef getAProtocolDef() {
126
exists(Expr e |
127
e =
- API::moduleImport("typing")
- .getMember("Protocol")
- .getASubclass*()
128
+ getATypedSubclass*(API::moduleImport("typing").getMember("Protocol"))
129
.getAValueReachableFromSource()
130
.asExpr()
131
|
0 commit comments