Compare commits
2 commits
fbe470a5ec
...
9bb821d48d
| Author | SHA1 | Date | |
|---|---|---|---|
| 9bb821d48d | |||
| c690620d03 |
1 changed files with 2 additions and 2 deletions
|
|
@ -164,8 +164,8 @@ def get_fuzzy(self, key: str, max_distance: int = 0) -> Iterator[FuzzyResult[T]]
|
|||
row = list(range(len(key) + 1))
|
||||
|
||||
# Base case for the empty string
|
||||
if (distance := row[-1]) <= max_distance and node._value != None:
|
||||
yield FuzzyResult(distance, "", node._value)
|
||||
if (distance := row[-1]) <= max_distance and self._value != None:
|
||||
yield FuzzyResult(distance, "", self._value)
|
||||
for c, child in self._children.items():
|
||||
yield from helper(c, child, row)
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue