mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Update python/ql/src/Exceptions/UnguardedNextInGenerator.ql
Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9560c804b8
commit
06f0947318
@@ -29,7 +29,7 @@ predicate call_to_next(CallNode call, ControlFlowNode iter) {
|
||||
}
|
||||
|
||||
predicate call_to_next_has_default(CallNode call) {
|
||||
exists(call.getArg(1))
|
||||
exists(call.getArg(1)) or exists(call.getArgByName("default"))
|
||||
}
|
||||
|
||||
predicate guarded_not_empty_sequence(EssaVariable sequence) {
|
||||
@@ -63,4 +63,3 @@ not exists(Comp comp | comp.contains(call.getNode())) and
|
||||
not stop_iteration_handled(call)
|
||||
|
||||
select call, "Call to next() in a generator"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user