)]}'
{"swiftclient/client.py":[{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"33342bbdaf238fc19eaa9d059e8906bad186ea65","unresolved":false,"context_lines":[{"line_number":332,"context_line":"                          % auth_version)"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"def build_response(resp, response):"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    resp_headers \u003d {}"},{"line_number":338,"context_line":"    for header, value in resp.getheaders():"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2F%2FlY%3D","line":335,"updated":"2013-06-14 23:23:37.000000000","message":"This needs better parameter names.  I\u0027d suggest \"resp\" or \"response\" for the actual response (the source of information) and \"response_holder\" or \"results_holder\" for the pass-by-reference thing into which data is being placed.\n\nSee also the below suggestion for putting the check for None inside this function.","commit_id":"54208e96bb866c878edcb0ab9b042b9f66a2ec66"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"33342bbdaf238fc19eaa9d059e8906bad186ea65","unresolved":false,"context_lines":[{"line_number":444,"context_line":"    return resp_headers"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"def post_account(url, token, headers, http_conn\u003dNone, response\u003dNone):"},{"line_number":448,"context_line":"    \"\"\""},{"line_number":449,"context_line":"    Update an account\u0027s metadata."},{"line_number":450,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2F%2FkM%3D","line":447,"updated":"2013-06-14 23:23:37.000000000","message":"I think \"response_holder\" or something less ambiguous would be better for this parameter name.  Almost anything less ambiguous than \"response\" would be better.","commit_id":"54208e96bb866c878edcb0ab9b042b9f66a2ec66"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"33342bbdaf238fc19eaa9d059e8906bad186ea65","unresolved":false,"context_lines":[{"line_number":453,"context_line":"    :param headers: additional headers to include in the request"},{"line_number":454,"context_line":"    :param http_conn: HTTP connection object (If None, it will create the"},{"line_number":455,"context_line":"                      conn object)"},{"line_number":456,"context_line":"    :parma response: an empty dictionary into which to place"},{"line_number":457,"context_line":"                     the response - status, reason and headers"},{"line_number":458,"context_line":"    :raises ClientException: HTTP POST request failed"},{"line_number":459,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2F%2Fl4%3D","line":456,"updated":"2013-06-14 23:23:37.000000000","message":"\"param\"","commit_id":"54208e96bb866c878edcb0ab9b042b9f66a2ec66"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"33342bbdaf238fc19eaa9d059e8906bad186ea65","unresolved":false,"context_lines":[{"line_number":469,"context_line":"    http_log((url, method,), {\u0027headers\u0027: headers}, resp, body)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    if response is not None:"},{"line_number":472,"context_line":"        build_response(resp, response)"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"    if resp.status \u003c 200 or resp.status \u003e\u003d 300:"},{"line_number":475,"context_line":"        raise ClientException(\u0027Account POST failed\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2F%2Fls%3D","line":472,"updated":"2013-06-14 23:23:37.000000000","message":"I\u0027d suggest renaming the helper function to store_response() and put the check for None inside it.  So this call would change to:\n\n  build_response(resp, response)\n\nAnd the body of build_response would look something like\n\n  if response_holder is not None:\n      \u003cstore stuff\u003e","commit_id":"54208e96bb866c878edcb0ab9b042b9f66a2ec66"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"33342bbdaf238fc19eaa9d059e8906bad186ea65","unresolved":false,"context_lines":[{"line_number":756,"context_line":"    conn.request(method, path, \u0027\u0027, headers)"},{"line_number":757,"context_line":"    resp \u003d conn.getresponse()"},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"    resp_headers \u003d {}"},{"line_number":760,"context_line":"    for header, value in resp.getheaders():"},{"line_number":761,"context_line":"        resp_headers[header.lower()] \u003d value"},{"line_number":762,"context_line":"    if response is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2F%2Fkk%3D","line":759,"updated":"2013-06-14 23:23:37.000000000","message":"I\u0027m assuming this wasn\u0027t just a call to build_response() because you wanted to remove the duplication in the header to-lowering?\n\nHow about something like this (which assumes you rename the optional pass-by-reference dictionary argument to \"response_holder\"):\n\n  parsed_response \u003d {}\n  build_response(resp, parsed_response)\n  if response_holder is not None:\n      response_holder.update(parsed_response)\n  ...\n\nThen change references to \"resp_headers\" to be \"parsed_response[\u0027headers\u0027]\" instead.  Or you can just say\n\n  resp_headers \u003d parsed_response[\u0027headers\u0027]\n\nwhere the elipses are above, if that ends up making the rest of the function less awkward.","commit_id":"54208e96bb866c878edcb0ab9b042b9f66a2ec66"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"33342bbdaf238fc19eaa9d059e8906bad186ea65","unresolved":false,"context_lines":[{"line_number":859,"context_line":"    :param proxy: proxy to connect through, if any; None by default; str of the"},{"line_number":860,"context_line":"                  format \u0027http://127.0.0.1:8888\u0027 to set one"},{"line_number":861,"context_line":"    :param query_string: if set will be appended with \u0027?\u0027 to generated path"},{"line_number":862,"context_line":"    :parma response: an empty dictionary into which to place"},{"line_number":863,"context_line":"                     the response - status, reason and headers"},{"line_number":864,"context_line":"    :returns: etag"},{"line_number":865,"context_line":"    :raises ClientException: HTTP PUT request failed"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2F%2Fkg%3D","line":862,"updated":"2013-06-14 23:23:37.000000000","message":"\"param\"","commit_id":"54208e96bb866c878edcb0ab9b042b9f66a2ec66"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"33342bbdaf238fc19eaa9d059e8906bad186ea65","unresolved":false,"context_lines":[{"line_number":954,"context_line":"    :param headers: additional headers to include in the request"},{"line_number":955,"context_line":"    :param http_conn: HTTP connection object (If None, it will create the"},{"line_number":956,"context_line":"                      conn object)"},{"line_number":957,"context_line":"    :parma response: an empty dictionary into which to place"},{"line_number":958,"context_line":"                     the response - status, reason and headers"},{"line_number":959,"context_line":"    :raises ClientException: HTTP POST request failed"},{"line_number":960,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2F%2Fkc%3D","line":957,"updated":"2013-06-14 23:23:37.000000000","message":"\"param\"","commit_id":"54208e96bb866c878edcb0ab9b042b9f66a2ec66"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"33342bbdaf238fc19eaa9d059e8906bad186ea65","unresolved":false,"context_lines":[{"line_number":998,"context_line":"    :param proxy: proxy to connect through, if any; None by default; str of the"},{"line_number":999,"context_line":"                  format \u0027http://127.0.0.1:8888\u0027 to set one"},{"line_number":1000,"context_line":"    :param query_string: if set will be appended with \u0027?\u0027 to generated path"},{"line_number":1001,"context_line":"    :parma response: an empty dictionary into which to place"},{"line_number":1002,"context_line":"                     the response - status, reason and headers"},{"line_number":1003,"context_line":"    :returns: a tuple of (response headers, the object\u0027s contents) The response"},{"line_number":1004,"context_line":"              headers will be a dict and all header names will be lowercase."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2F%2FkY%3D","line":1001,"updated":"2013-06-14 23:23:37.000000000","message":"\"param\"","commit_id":"54208e96bb866c878edcb0ab9b042b9f66a2ec66"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"33342bbdaf238fc19eaa9d059e8906bad186ea65","unresolved":false,"context_lines":[{"line_number":1000,"context_line":"    :param query_string: if set will be appended with \u0027?\u0027 to generated path"},{"line_number":1001,"context_line":"    :parma response: an empty dictionary into which to place"},{"line_number":1002,"context_line":"                     the response - status, reason and headers"},{"line_number":1003,"context_line":"    :returns: a tuple of (response headers, the object\u0027s contents) The response"},{"line_number":1004,"context_line":"              headers will be a dict and all header names will be lowercase."},{"line_number":1005,"context_line":"    :raises ClientException: HTTP DELETE request failed"},{"line_number":1006,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2F%2FkQ%3D","line":1003,"updated":"2013-06-14 23:23:37.000000000","message":"Hrm, it doesn\u0027t look like this function returns anything?  Is this :returns: the result of cut-n-paste-itis?","commit_id":"54208e96bb866c878edcb0ab9b042b9f66a2ec66"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"b30e2f12fc39fb038d83eedff70940500394dca5","unresolved":false,"context_lines":[{"line_number":336,"context_line":"    \"\"\""},{"line_number":337,"context_line":"    store information about an operation into a dict"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"    :param resp: a dict containing the response headers"},{"line_number":340,"context_line":"    :param response_dict: a dict into which are placed the"},{"line_number":341,"context_line":"       status, reason and a dict of lower-cased headers"},{"line_number":342,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2F%2BFE%3D","line":339,"updated":"2013-06-17 03:32:40.000000000","message":"\"resp\" isn\u0027t just a dict, right?  I think it\u0027s some kind of http response object.","commit_id":"eac8bda05436706f80e4ab7dd837c327e75f4432"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"b30e2f12fc39fb038d83eedff70940500394dca5","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        for header, value in resp.getheaders():"},{"line_number":346,"context_line":"            resp_headers[header.lower()] \u003d value"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"            response_dict[\u0027status\u0027] \u003d resp.status"},{"line_number":349,"context_line":"            response_dict[\u0027reason\u0027] \u003d resp.reason"},{"line_number":350,"context_line":"            response_dict[\u0027headers\u0027] \u003d resp_headers"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2F%2BFA%3D","line":348,"updated":"2013-06-17 03:32:40.000000000","message":"I\u0027m not sure if I\u0027m reading this right, but it looks like these three assignments for status, reason, and headers are all inside the \"for\" loop?  If that\u0027s true, they should be out-dented to execute once, after the for loop.","commit_id":"eac8bda05436706f80e4ab7dd837c327e75f4432"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"b30e2f12fc39fb038d83eedff70940500394dca5","unresolved":false,"context_lines":[{"line_number":459,"context_line":"    :param headers: additional headers to include in the request"},{"line_number":460,"context_line":"    :param http_conn: HTTP connection object (If None, it will create the"},{"line_number":461,"context_line":"                      conn object)"},{"line_number":462,"context_line":"    :param response_dict: an empty dictionary into which to place"},{"line_number":463,"context_line":"                     the response - status, reason and headers"},{"line_number":464,"context_line":"    :raises ClientException: HTTP POST request failed"},{"line_number":465,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2F%2BE8%3D","line":462,"updated":"2013-06-17 03:32:40.000000000","message":"There\u0027s no particular need for it to be empty, but it is worth nothing that it\u0027s optional.  I\u0027d recommend,\n\n  an optional dictionary into which...","commit_id":"eac8bda05436706f80e4ab7dd837c327e75f4432"}]}
