You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/06 19:40:46 UTC

[GitHub] [superset] eschutho commented on a diff in pull request #19569: fix: ensure url is a string

eschutho commented on code in PR #19569:
URL: https://github.com/apache/superset/pull/19569#discussion_r844329528


##########
superset/databases/utils.py:
##########
@@ -112,7 +112,9 @@ def make_url_safe(raw_url: str) -> URL:
     :param raw_url:
     :return:
     """
+
+    url = str(raw_url).strip()

Review Comment:
   Yeah, that's tricky. I found that sometimes we're passing in `Url` because this method has already previously been run on a uri before it was passed in here, but it would technically be better if this function were passed in a string. But since the typing is just a hint, we still need to provide our own guards against incorrect types. Do you think adding `Url` to the typing is still helpful or maybe a comment here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org