aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2021-08-23 21:13:08 +0200
committerGravatar Numerlor <[email protected]>2021-08-23 21:13:08 +0200
commit9dc4b3e26e1c355c2626a4fca3bc6327c2e9d132 (patch)
tree34024c3728566142b835422ae7553056fc07a225
parentMove definition of loop vars next to loop (diff)
remove redundant index assignments
Co-authored-by: Bluenix <[email protected]>
-rw-r--r--bot/exts/info/tags.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/info/tags.py b/bot/exts/info/tags.py
index 8bb682366..520089e19 100644
--- a/bot/exts/info/tags.py
+++ b/bot/exts/info/tags.py
@@ -117,12 +117,12 @@ def _fuzzy_search(search: str, target: str) -> float:
_search = REGEX_NON_ALPHABET.sub("", search.lower())
_targets = iter(REGEX_NON_ALPHABET.split(target.lower()))
- current, index = 0, 0
+ current = 0
for _target in _targets:
+ index = 0
while index < len(_target) and _search[current] == _target[index]:
current += 1
index += 1
- index = 0
return current / len(_search)