(check)
return check_uses_http_wrapper
Return true if the check uses the http wrapper class in any of its files.
    If any of the check's files uses the request library, abort.

    check -- name of the check
Return true if the check uses the http wrapper class in any of its files.
    If any of the check's files uses the request library, abort.
Return true if the check uses the http wrapper class in any of its files . If any of the check s files uses the request library abort .
def validate_use_http_wrapper(check):
    """Return true if the check uses the http wrapper class in any of its files.
    If any of the check's files uses the request library, abort.

    check -- name of the check
    """
    has_failed = False
    check_uses_http_wrapper = False
    for file in get_check_files(check, include_tests=False):
        if file.endswith('.py'):
            file_uses_http_wrapper, file_uses_request_lib, has_arg_warning = validate_use_http_wrapper_file(file, check)
            has_failed = has_failed or file_uses_request_lib
            check_uses_http_wrapper = check_uses_http_wrapper or file_uses_http_wrapper
            if check_uses_http_wrapper and has_arg_warning:
                # Check for headers= or auth=
                echo_warning(
                    f"{check}: \n"
                    f"    The HTTP wrapper contains parameter `{has_arg_warning.group().replace('=', '')}`, "
                    f"this configuration is handled by the wrapper automatically.\n"
                    f"    If this a genuine usage of the parameters, "
                    f"please inline comment `# SKIP_HTTP_VALIDATION`"
                )
                pass

    if has_failed:
        abort()
    return check_uses_http_wrapper
def validate_use_http_wrapper ( check ) : has_failed = False check_uses_http_wrapper = False for file in get_check_files ( check , include_tests = False ) : if file . endswith ( '.py' ) : file_uses_http_wrapper , file_uses_request_lib , has_arg_warning = validate_use_http_wrapper_file ( file , check ) has_failed = has_failed or file_uses_request_lib check_uses_http_wrapper = check_uses_http_wrapper or file_uses_http_wrapper if check_uses_http_wrapper and has_arg_warning : # Check for headers= or auth= echo_warning ( f"{check}: \n" f"    The HTTP wrapper contains parameter `{has_arg_warning.group().replace('=', '')}`, " f"this configuration is handled by the wrapper automatically.\n" f"    If this a genuine usage of the parameters, " f"please inline comment `# SKIP_HTTP_VALIDATION`" ) pass if has_failed : abort ( ) return check_uses_http_wrapper