fix: remove dead code and duplicate set items in entity_registry.py
Remove discarded `query.lower()` call in `extract_people_from_query` — strings are immutable so the result was always thrown away. The existing `re.IGNORECASE` flag already handles case-insensitive matching. Remove duplicate literals in COMMON_ENGLISH_WORDS set: "hunter" (consecutive duplicate), "april" and "june" (appeared in both names and months sections).
This commit is contained in:
@@ -44,7 +44,6 @@ COMMON_ENGLISH_WORDS = {
|
||||
"chance",
|
||||
"chase",
|
||||
"hunter",
|
||||
"hunter",
|
||||
"dash",
|
||||
"flash",
|
||||
"star",
|
||||
@@ -78,8 +77,6 @@ COMMON_ENGLISH_WORDS = {
|
||||
"january",
|
||||
"february",
|
||||
"march",
|
||||
"april",
|
||||
"june",
|
||||
"july",
|
||||
"august",
|
||||
"september",
|
||||
@@ -597,7 +594,6 @@ class EntityRegistry:
|
||||
Returns list of canonical names found.
|
||||
"""
|
||||
found = []
|
||||
query.lower()
|
||||
|
||||
for canonical, info in self.people.items():
|
||||
names_to_check = [canonical] + info.get("aliases", [])
|
||||
|
||||
Reference in New Issue
Block a user