)]}'
{"nodepool/driver/static/provider.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"9de5c142ec0babdedb2f35303699ed4a7644f1cd","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    if isinstance(node, dict):"},{"line_number":33,"context_line":"        return (node[\"name\"], node[\"username\"], node[\"connection-port\"])"},{"line_number":34,"context_line":"    else:"},{"line_number":35,"context_line":"        return (node.hostname, node.username, node.connection_port)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class StaticNodeProvider(Provider):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_e1f685d7","line":35,"updated":"2019-06-12 23:37:18.000000000","message":"It might be a good idea to return a named tuple (https://docs.python.org/3/library/collections.html#collections.namedtuple) so that we can refer to the attributes of the identifier set by name.","commit_id":"a7ef7e69e237641d6f9a9a2cdf0d292926e2d0c9"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"5f60d63058510073ea8ecb9b0e93f46deef937af","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    if isinstance(node, dict):"},{"line_number":33,"context_line":"        return (node[\"name\"], node[\"username\"], node[\"connection-port\"])"},{"line_number":34,"context_line":"    else:"},{"line_number":35,"context_line":"        return (node.hostname, node.username, node.connection_port)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class StaticNodeProvider(Provider):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_01b159e1","line":35,"in_reply_to":"9fb8cfa7_e1f685d7","updated":"2019-06-12 23:57:40.000000000","message":"Done","commit_id":"a7ef7e69e237641d6f9a9a2cdf0d292926e2d0c9"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"9de5c142ec0babdedb2f35303699ed4a7644f1cd","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                node.state !\u003d zk.READY or"},{"line_number":86,"context_line":"                node.hostname !\u003d node_tuple[0] or"},{"line_number":87,"context_line":"                node.username !\u003d node_tuple[1] or"},{"line_number":88,"context_line":"                node.connection_port !\u003d node_tuple[2]"},{"line_number":89,"context_line":"            ):"},{"line_number":90,"context_line":"                continue"},{"line_number":91,"context_line":"            nodes.append(node)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_6134d593","line":88,"updated":"2019-06-12 23:37:18.000000000","message":"Places like this would likely benefit from the named tuple.\n\nAnother approach would be to directly compare two tuples. For example:\n\n  (node.hostname, node.username, node.connection_port) !\u003d node_tuple","commit_id":"a7ef7e69e237641d6f9a9a2cdf0d292926e2d0c9"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"5f60d63058510073ea8ecb9b0e93f46deef937af","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                node.state !\u003d zk.READY or"},{"line_number":86,"context_line":"                node.hostname !\u003d node_tuple[0] or"},{"line_number":87,"context_line":"                node.username !\u003d node_tuple[1] or"},{"line_number":88,"context_line":"                node.connection_port !\u003d node_tuple[2]"},{"line_number":89,"context_line":"            ):"},{"line_number":90,"context_line":"                continue"},{"line_number":91,"context_line":"            nodes.append(node)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_81c46941","line":88,"in_reply_to":"9fb8cfa7_6134d593","updated":"2019-06-12 23:57:40.000000000","message":"Done","commit_id":"a7ef7e69e237641d6f9a9a2cdf0d292926e2d0c9"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"9de5c142ec0babdedb2f35303699ed4a7644f1cd","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        return False"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def getRegisteredNode(self):"},{"line_number":116,"context_line":"        \u0027\u0027\u0027"},{"line_number":117,"context_line":"        Get hostnames for all registered static nodes."},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_811a2914","line":115,"range":{"start_line":115,"start_character":21,"end_line":115,"end_character":25},"updated":"2019-06-12 23:37:18.000000000","message":"Nit: This function name should probably be plural.\n\n  getRegisteredNodes(self):","commit_id":"a7ef7e69e237641d6f9a9a2cdf0d292926e2d0c9"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"5f60d63058510073ea8ecb9b0e93f46deef937af","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        return False"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def getRegisteredNode(self):"},{"line_number":116,"context_line":"        \u0027\u0027\u0027"},{"line_number":117,"context_line":"        Get hostnames for all registered static nodes."},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_a1bf2da8","line":115,"range":{"start_line":115,"start_character":21,"end_line":115,"end_character":25},"in_reply_to":"9fb8cfa7_811a2914","updated":"2019-06-12 23:57:40.000000000","message":"Done","commit_id":"a7ef7e69e237641d6f9a9a2cdf0d292926e2d0c9"}]}
