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
Constants(titles='dr') silently shreds a bare string into characters #238
Every Iterable[str] parameter on Constants.__init__ accepts a bare str, which is an iterable — of characters. SetManager.__init__ (config/init.py, self.elements = set(elements)) then builds a set of single characters, silently replacing the entire default set.
The same applies to all SetManager-backed keyword arguments. This is the same pattern family as #226: caller hands in configuration, the library silently destroys the intent. Debugging it later means diffing large constant sets.
Fix: reject str/bytes in SetManager.__init__ (or at the Constants.__init__ boundary) with a TypeError suggesting the fix, e.g. expected an iterable of strings, got a single string — wrap it: ['dr'].
Found by review of PR #237 — pre-existing, unrelated to that change.
Activity
Normalize SetManager operator operands like add() does
Fix bare string to SetManager silently shredding into characters (#240)
Simplify SetManager/TupleManager guards from cleanup review
Guard remaining config assignment paths against silent corruption (#246)
Restore v1.3/1.4 manager hardening in the shim (#221/#238/#241/#242/#260
Give bytes a decode hint, and record what each perf shape covers