Skip to content
Myr

cleanup of auth __eq__

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent f7447d1 · Browse files · 1 file+8 added−12 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−12 removed

  • other:+8 added−12 removed

1 file+8 added−12 removed

modified:requests/auth.py+8 added-12 removed
46 unmodified lines
47 self.username = username48 self.password = password4950 def __eq__(self, other):51 if not isinstance(other, HTTPBasicAuth):52 return NotImplemented53 return self.username == other.username and self.password == other.password51 return all([52 self.username == getattr(other, 'username', None),53 self.password == getattr(other, 'password', None)54 ]5556 def __ne__(self, other):57 return not self == other58
172 unmodified lines
231232 return r233234 def __eq__(self, other):234 if not isinstance(other, HTTPDigestAuth):235 return NotImplemented236 return self.username == other.username and \237 self.password == other.password and \238 self.last_nonce == other.last_nonce and \239 self.nonce_count == other.nonce_count and \240 self.chal == other.chal and \241 self.pos == other.pos and \242 self.num_401_calls == other.num_401_calls235 return all([236 self.username == getattr(other, 'username', None),237 self.password == getattr(other, 'password', None)238 ]239240 def __ne__(self, other):241 return not self == other