mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Python: UnguardedNextInGenerator.ql: Excludes next with default value
This commit is contained in:
@@ -47,3 +47,6 @@ def next_in_comp(seq, fields):
|
||||
seq_iter = iter(seq)
|
||||
values = [ next(seq_iter) if f.attname in NAMES else DEFAULT for f in fields ]
|
||||
return values
|
||||
|
||||
def ok5(seq):
|
||||
yield next(iter([]), 'foo')
|
||||
|
||||
Reference in New Issue
Block a user