This PR fixes an edge-case in url and safety when the result of urlparse has a hostname of None
19:20 <+dgw> https://?bonk
19:20 <+Sopel> Unexpected AttributeError ('NoneType' object has no attribute 'lower') from dgw at 2023-06-13 23:20:54.685361+00:00. Message was: https://?bonk
19:20 <+Sopel> Unexpected AttributeError ('NoneType' object has no attribute 'lower') from dgw at 2023-06-13 23:20:54.705164+00:00. Message was: https://?bonk
Description
This PR fixes an edge-case in
url
andsafety
when the result ofurlparse
has ahostname
ofNone
Checklist
make qa
(runsmake quality
andmake test
)mypy
over Sopel's codebase