Example #1
0
 def __eq__(self, other):
     # type: (typing.Any) -> bool
     return (
         _are_objects_equal(
             self, other,
             # requests.Session does not define equality methods
             attributes_to_ignore={'session'},
         ) and
         # We're checking for requests.Session to be mostly the same as custom
         # configurations (ie. max_redirects, proxies, SSL verification, etc.)
         # might be possible.
         _are_objects_equal(
             self.session, other.session,
             attributes_to_ignore={
                 'adapters',  # requests.adapters.HTTPAdapter do not define equality
                 'prefetch',  # attribute present in requests.Session.__attrs__ but never initialised or used
             },
         )
     )
Example #2
0
 def __eq__(self, other):
     # type: (typing.Any) -> bool
     return _are_objects_equal(self, other)