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
Instead of setting HIBP.response to a string ("object has not been pwned.") for not pwned ressources, the awaited type should be used.
If response is meant to be an [json]object: HIBP.response should be None.
If response is meant to be a list/array: HIBP.response should be an empty list.
The user of the module would then be able to easily check for existence of HIBP.response for further processing, instead of testing it against a string ("object has not been pwned.") or applying a type test.
for hibp_obj in hibp_objs:
if hibp_obj.response:
#do something amazing with the response
#or
pwneds = [hibp_obj for hibp_obj in hibp_objs if hibp_obj.response]
The text was updated successfully, but these errors were encountered:
Instead of setting HIBP.response to a string ("object has not been pwned.") for not pwned ressources, the awaited type should be used.
If response is meant to be an [json]object: HIBP.response should be None.
If response is meant to be a list/array: HIBP.response should be an empty list.
The user of the module would then be able to easily check for existence of HIBP.response for further processing, instead of testing it against a string ("object has not been pwned.") or applying a type test.
The text was updated successfully, but these errors were encountered: