Skip to content

Commit d535246

Browse files
committed
Python: Modernizes query
1 parent 02ae0fb commit d535246

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

python/ql/src/Exceptions/UnguardedNextInGenerator.ql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212

1313
import python
1414

15-
FunctionObject iter() {
16-
result = Object::builtin("iter")
15+
FunctionValue iter() {
16+
result = Value::named("iter")
1717
}
1818

19-
BuiltinFunctionObject next() {
20-
result = Object::builtin("next")
19+
BuiltinFunctionValue next() {
20+
result = Value::named("next")
2121
}
2222

2323
predicate call_to_iter(CallNode call, EssaVariable sequence) {
@@ -43,7 +43,7 @@ predicate iter_not_exhausted(EssaVariable iterator) {
4343
predicate stop_iteration_handled(CallNode call) {
4444
exists(Try t |
4545
t.containsInScope(call.getNode()) and
46-
t.getAHandler().getType().refersTo(theStopIterationType())
46+
t.getAHandler().getType().pointsTo(ClassValue::stopIteration())
4747
)
4848
}
4949

0 commit comments

Comments
 (0)