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
Headers.eq called list(other) directly without handling non-iterable types. When comparing against a non-iterable operand (such as None or unittest.mock.ANY), list(other) raised TypeError instead of returning NotImplemented to allow Python's equality fallback.
Fix
Wrapped the list comparison in a try-except TypeError block in Headers.eq to return NotImplemented when other is non-iterable.
Fixes #214
Root Cause
Headers.eq called list(other) directly without handling non-iterable types. When comparing against a non-iterable operand (such as None or unittest.mock.ANY), list(other) raised TypeError instead of returning NotImplemented to allow Python's equality fallback.
Fix
Wrapped the list comparison in a try-except TypeError block in Headers.eq to return NotImplemented when other is non-iterable.