You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SetManager.__contains__ is the lone non-normalizing membership check #244
After #238's follow-ups on PR #240, SetManager normalizes everywhere — add(), remove(), the constructor, and all set operators apply lc() (lowercase, strip leading/trailing periods). __contains__ is now the single exception:
A user who checks 'Dr.' in c.titles, sees False, and concludes their config never took effect is misled — every other operation on the same value succeeds.
Fix options: normalize str values in __contains__ (lc(value) in self.elements; the parser's own lc(piece) in ... calls are unaffected since lc is idempotent), or document raw membership as intended. Normalizing seems right for consistency. Note the ABC comparison mixins (__le__, __eq__) route through __contains__/element iteration, so check those semantics while at it.
Found by review of PR #240 — the asymmetry predates that PR (add/remove already normalized), but the PR widens it: seven operations normalize, one membership check doesn't.
Activity
Update release log and AGENTS.md for #241, #239, #242, #244