File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -432,6 +432,12 @@ def get_user_agent() -> str:
432432def check_url (url : str ) -> bool :
433433 """
434434 Verify that URL is valid.
435+
436+ Args:
437+ url: URL to be validated
438+
439+ Returns:
440+ True if the URL can be parsed, contains both scheme and netloc
435441 """
436442
437443 try :
@@ -444,6 +450,13 @@ def check_url(url: str) -> bool:
444450def check_content_type (content_type : Union [str , None ], url : str ) -> bool :
445451 """
446452 Verify that content_type is text/plain and log failures.
453+
454+ Args:
455+ content_type: Value of Content-Type header field
456+ url: URL of the checked artifact
457+
458+ Returns:
459+ True if content type is text/plain
447460 """
448461 if not content_type :
449462 logger .warning ("No content-type reported for artifact at %s" , url )
@@ -461,6 +474,12 @@ def verify_artifact(url: str) -> bool:
461474 Verify that URL points to an text/plain artifact that can be downloaded.
462475
463476 Checks Content-Type in headers using GET request.
477+
478+ Args:
479+ url: URL of the artifact to be verified
480+
481+ Returns:
482+ True if the artifact satisfies all requirements
464483 """
465484
466485 if not check_url (url = url ):
You can’t perform that action at this time.
0 commit comments