@@ -17,7 +17,7 @@ class TrieNode:
|
||||
|
||||
def add(self, word: str, definitions: list[str] | None = None) -> None:
|
||||
"""Add a word to the trie."""
|
||||
word = word.lower().strip().replace("ё", "е")
|
||||
word = word.lower().strip().replace("ё", "е") # noqa: RUF001
|
||||
node = self
|
||||
for i in range(len(word)):
|
||||
if word[i] not in node.children:
|
||||
@@ -35,7 +35,7 @@ class TrieNode:
|
||||
the word is in the trie, or
|
||||
is a prefix of a longer word.
|
||||
"""
|
||||
word = word.lower().strip().replace("ё", "е")
|
||||
word = word.lower().strip().replace("ё", "е") # noqa: RUF001
|
||||
node = self
|
||||
for i in range(len(word)):
|
||||
if word[i] not in node.children:
|
||||
|
||||
Reference in New Issue
Block a user