From 3c78e2fbb5acff4f1e8a7612be5905c466419802 Mon Sep 17 00:00:00 2001 From: adv3nt3 Date: Tue, 7 Apr 2026 13:00:59 +0200 Subject: [PATCH] fix: remove dead code and duplicate set items in entity_registry.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- mempalace/entity_registry.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mempalace/entity_registry.py b/mempalace/entity_registry.py index a7a0dfe..6ce9c62 100644 --- a/mempalace/entity_registry.py +++ b/mempalace/entity_registry.py @@ -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", [])