-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* just some more quick fixes * Update haystack/utils/url_validation.py Co-authored-by: Madeesh Kannan <[email protected]> --------- Co-authored-by: Madeesh Kannan <[email protected]>
- Loading branch information
1 parent
b20a14d
commit 3777f43
Showing
3 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
from urllib.parse import urlparse | ||
|
||
|
||
def is_valid_http_url(url) -> bool: | ||
def is_valid_http_url(url: str) -> bool: | ||
"""Check if a URL is a valid HTTP/HTTPS URL.""" | ||
r = urlparse(url) | ||
return all([r.scheme in ["http", "https"], r.netloc]) |