Skip to content

Commit

Permalink
Merge pull request #3976 from aboutcode-org/declare-ngram-variable
Browse files Browse the repository at this point in the history
Declare ngram variable in select_ngrams
  • Loading branch information
JonoYang authored Nov 7, 2024
2 parents 74d24f7 + 220fc43 commit 15b76ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/licensedcode/tokenize.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ def select_ngrams(ngrams, with_pos=False):
>>> list(select_ngrams(x for x in [(2, 1, 3), (1, 1, 3), (5, 1, 3), (2, 6, 1), (7, 3, 4)]))
[(2, 1, 3), (1, 1, 3), (5, 1, 3), (2, 6, 1), (7, 3, 4)]
"""
ngram = None
last = None
for pos, ngram in enumerate(ngrams):
# FIXME: use a proper hash
Expand Down

0 comments on commit 15b76ea

Please sign in to comment.