Skip to content

Commit 15b76ea

Browse files
authored
Merge pull request #3976 from aboutcode-org/declare-ngram-variable
Declare ngram variable in select_ngrams
2 parents 74d24f7 + 220fc43 commit 15b76ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/licensedcode/tokenize.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ def select_ngrams(ngrams, with_pos=False):
336336
>>> list(select_ngrams(x for x in [(2, 1, 3), (1, 1, 3), (5, 1, 3), (2, 6, 1), (7, 3, 4)]))
337337
[(2, 1, 3), (1, 1, 3), (5, 1, 3), (2, 6, 1), (7, 3, 4)]
338338
"""
339+
ngram = None
339340
last = None
340341
for pos, ngram in enumerate(ngrams):
341342
# FIXME: use a proper hash

0 commit comments

Comments
 (0)