fix(polymarket): _PARTY_RE: add Republicans? plural support for symmetry
CI/CD / build-and-push (push) Successful in 2m24s

Republicans (plural) previously didn't match _PARTY_RE because the pattern
was r"\bRepublican\b" (no optional s).  Added Republicans? for symmetry with
Democrats?.  The general-election family fix already handles this case via
etype_m, but the plural match is needed for the party-only fallback branch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chemavx
2026-04-17 10:35:07 +00:00
parent ebdcff5a6e
commit 9add52ab05
+1 -1
View File
@@ -42,7 +42,7 @@ _US_STATE_RE = re.compile(
r"West\s+Virginia|Wisconsin|Wyoming)\b",
re.IGNORECASE,
)
_PARTY_RE = re.compile(r"\b(Republican|Democrats?|Democratic|GOP)\b", re.IGNORECASE)
_PARTY_RE = re.compile(r"\b(Republicans?|Democrats?|Democratic|GOP)\b", re.IGNORECASE)
_ELECTION_TYPE_RE = re.compile(
r"\b(presidential|president|mayoral|mayor|gubernatorial|governor|"
r"senate|congress(?:ional)?|primary|election)\b",