Fixed lints.
Testing zangramru / lint (push) Successful in 1m5s
Testing zangramru / pytest (push) Successful in 1m5s

Signed-off-by: Pavel Kirilin <s3riussan@gmail.com>
This commit is contained in:
2026-07-03 10:24:21 +02:00
parent 9036816e97
commit eb2c2771c4
+2 -2
View File
@@ -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: