Skip to content

Commit 2282c60

Browse files
committed
Rename pat to regex.
1 parent 50ed918 commit 2282c60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fuzzyfinder/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ def fuzzyfinder(text, collection):
1616
input.
1717
"""
1818
suggestions = []
19-
regex = '.*?'.join(map(re.escape, text))
20-
pat = re.compile('%s' % regex)
19+
pat = '.*?'.join(map(re.escape, text))
20+
regex = re.compile('%s' % pat)
2121
for item in sorted(collection):
22-
r = pat.search(item)
22+
r = regex.search(item)
2323
if r:
2424
suggestions.append((len(r.group()), r.start(), item))
2525

0 commit comments

Comments
 (0)