Return hash based on the cookies key attributes.
(self)
| 272 | return self_keys == other_keys |
| 273 | |
| 274 | def __hash__(self) -> int: |
| 275 | """Return hash based on the cookies key attributes.""" |
| 276 | cookie_tuples = frozenset((cookie.name, cookie.value, cookie.domain, cookie.path) for cookie in self._jar) |
| 277 | return hash(cookie_tuples) |
| 278 | |
| 279 | def _is_valid_same_site(self, value: str | None) -> TypeGuard[Literal['Lax', 'None', 'Strict']]: |
| 280 | return value in {'Lax', 'None', 'Strict'} |