spidermon
spidermon copied to clipboard
Are the `is_url` and `is_email` functions correct?
The is_url and is_email in spidermon/contrib/validation/jsonschema/formats.py returns True is the input is anything but a string.
Thus, dict(), 42, [42, {}, ('a', 'tuple')] would all be valid emails or URLs according to these logic.
Shouldn't these files read like this instead?
if not isinstance(instance, str_types):
return False
# …