)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"a3c25424d6df90eb4f8b59801e8a9db043a87018","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Hacking check for opt name registration"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Depending on how opts are registered (either with register_opt() or"},{"line_number":10,"context_line":"register_opts()), the name needs to be singular or plural to match"},{"line_number":11,"context_line":"the method. This patch adds a hacking check to make sure the names"},{"line_number":12,"context_line":"of the opts and opt lists are correct given how they are being"},{"line_number":13,"context_line":"registered."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba15a1d1_31efdeb1","line":10,"updated":"2015-09-15 19:17:40.000000000","message":"I\u0027m not sure I really follow this... it\u0027s not that the name matters, the type is what matters?  (list or not?)\n\nThe only way this hacking check works is if we manually enforce that *opts \u003dlist and *opt \u003d single option, which may be ok, but that should be noted here.","commit_id":"c1c363eb4c39650cf8f8206f3c1e913c960a3bff"}],"cinder/config/generate_cinder_opts.py":[{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"89d92a10197f067aa4a9df6ba63feeb1ae1f32c8","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        if atree \u003d\u003d \"cinder/config/generate_cinder_opts.py\":"},{"line_number":53,"context_line":"            continue"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        if atree \u003d\u003d \"cinder/hacking/checks.py\":"},{"line_number":56,"context_line":"            continue"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_edbae309","line":54,"updated":"2015-09-28 15:28:14.000000000","message":"Could combine this with the if statement on line 54.  Also not necessary now, but if we find there\u0027s a few more files we want to skip, we may want to throw them into a set for easy checking","commit_id":"74040d1fdc1a8b8fc5b7cd84c0e14cc2cb0f6f7e"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b1e123699ce4e06e62db77c5372879de8598ef41","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        if atree \u003d\u003d \"cinder/config/generate_cinder_opts.py\":"},{"line_number":53,"context_line":"            continue"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        if atree \u003d\u003d \"cinder/hacking/checks.py\":"},{"line_number":56,"context_line":"            continue"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        dirs_list \u003d atree.split(\u0027/\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a1a9d01_93ba66e0","line":55,"updated":"2015-10-05 14:10:04.000000000","message":"nit: Wouldn\u0027t it be cleaner to use in?\n\n if atree in (\"cinder/config/generate_cinder_opts.py\", \"cinder/hacking/checks.py\"):","commit_id":"4f6939d954b6e62660d02c8fc975850a5ca9d6a1"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"2f79d288c386ef337cbec336b67e30ec4d921a3e","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        if atree \u003d\u003d \"cinder/config/generate_cinder_opts.py\":"},{"line_number":53,"context_line":"            continue"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        if atree \u003d\u003d \"cinder/hacking/checks.py\":"},{"line_number":56,"context_line":"            continue"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        dirs_list \u003d atree.split(\u0027/\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_6a0cdf42","line":55,"in_reply_to":"9a1a9d01_93ba66e0","updated":"2015-10-05 15:46:00.000000000","message":"Done","commit_id":"4f6939d954b6e62660d02c8fc975850a5ca9d6a1"}],"cinder/hacking/checks.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"ab142d886ca6e647a8fdd7e84bc206797aadbf8d","unresolved":false,"context_lines":[{"line_number":491,"context_line":"    register(no_log_warn)"},{"line_number":492,"context_line":"    register(dict_constructor_with_list_copy)"},{"line_number":493,"context_line":"    register(no_test_log)"},{"line_number":494,"context_line":"    register(check_registration_of_opts)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_60735681","line":494,"updated":"2015-09-27 21:23:31.000000000","message":"This needs to be removed, and its associated code above, now that we have the AST checker, right?","commit_id":"1288c8a097950d703c0fd0d7274a0c1a6dd7a430"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"b189613aa1610ebe693a13f8e16944be321197e8","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    \"\"\""},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    CHECK_DESC \u003d (\u0027C313: Arguments being passed to register_opt/register_opts \u0027"},{"line_number":288,"context_line":"                  \u0027must be a single option or list of options respectively.\u0027)"},{"line_number":289,"context_line":"    REGISTER_METHODS \u003d ["},{"line_number":290,"context_line":"        \u0027register_opt\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_1156132a","line":287,"updated":"2015-09-29 19:01:39.000000000","message":"C313 isn\u0027t in the HACKING.rst  Are you sure you meant C313 here?","commit_id":"74040d1fdc1a8b8fc5b7cd84c0e14cc2cb0f6f7e"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"89d92a10197f067aa4a9df6ba63feeb1ae1f32c8","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            return node"},{"line_number":307,"context_line":"        else:  # could be Subscript, Call or many more"},{"line_number":308,"context_line":"            return None"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def visit_Call(self, node):"},{"line_number":311,"context_line":"        \"\"\"Look for the register_opt/register_opts calls.\"\"\""},{"line_number":312,"context_line":"        # extract the obj_name and method_name"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_30c7d046","line":309,"updated":"2015-09-28 15:28:14.000000000","message":"I understand that \"Call\" was capitalized here because it\u0027s referring to the \"Call\" class, but I still think this method name should be lowercased \"visit_call\" to follow method naming conventions","commit_id":"74040d1fdc1a8b8fc5b7cd84c0e14cc2cb0f6f7e"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"b189613aa1610ebe693a13f8e16944be321197e8","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            return node"},{"line_number":307,"context_line":"        else:  # could be Subscript, Call or many more"},{"line_number":308,"context_line":"            return None"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def visit_Call(self, node):"},{"line_number":311,"context_line":"        \"\"\"Look for the register_opt/register_opts calls.\"\"\""},{"line_number":312,"context_line":"        # extract the obj_name and method_name"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_9138e3ef","line":309,"in_reply_to":"9a1a9d01_30c7d046","updated":"2015-09-29 19:01:39.000000000","message":"yah agree with this.","commit_id":"74040d1fdc1a8b8fc5b7cd84c0e14cc2cb0f6f7e"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"89d92a10197f067aa4a9df6ba63feeb1ae1f32c8","unresolved":false,"context_lines":[{"line_number":326,"context_line":"            if not len(node.args):"},{"line_number":327,"context_line":"                return (super(CheckOptRegistrationArgs,"},{"line_number":328,"context_line":"                              self).generic_visit(node))"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"            # any argument should not be a tuple"},{"line_number":331,"context_line":"            if len(node.args) \u003e 1:"},{"line_number":332,"context_line":"                if method_name \u003d\u003d \u0027register_opt\u0027:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_f019587a","line":329,"updated":"2015-09-28 15:28:14.000000000","message":"I think that we can re-arrange this logic to make it easier to follow.  E.g. having the else check on line 316 return makes it so the rest of the logic following that else could actually be moved into the if statement on line 314.  \n\nI think the following logic is equivalent and would be easier to follow:\n\n       if isinstance(node.func.value, ast.Name):\n                 method_name \u003d node.func.attr\n \t         if method_name in self.REGISTER_METHODS and len(node.args) \u003e 1:\n\t                if method_name \u003d\u003d \u0027register_opt\u0027:\n                             if isinstance(node.args[0], ast.List):\n                                 self.add_error(node.args[0])\n                        if method_name \u003d\u003d \u0027register_opts\u0027:\n                             if not isinstance(node.args[0], ast.List):\n                                 self.add_error(node.args[0])\n\n      \treturn super(CheckOptRegistrationArgs, self).generic_visit(node)","commit_id":"74040d1fdc1a8b8fc5b7cd84c0e14cc2cb0f6f7e"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"89d92a10197f067aa4a9df6ba63feeb1ae1f32c8","unresolved":false,"context_lines":[{"line_number":329,"context_line":""},{"line_number":330,"context_line":"            # any argument should not be a tuple"},{"line_number":331,"context_line":"            if len(node.args) \u003e 1:"},{"line_number":332,"context_line":"                if method_name \u003d\u003d \u0027register_opt\u0027:"},{"line_number":333,"context_line":"                    if isinstance(node.args[0], ast.List):"},{"line_number":334,"context_line":"                        self.add_error(node.args[0])"},{"line_number":335,"context_line":"                if method_name \u003d\u003d \u0027register_opts\u0027:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_f0e39831","line":332,"updated":"2015-09-28 15:28:14.000000000","message":"Could optionally flip the order of the if statements so that we remove the duplicated code, e.g.\nif isinstance(node.args[0], ast.List):\n    if method_name \u003d\u003d \u0027register_opt\u0027:\n         # add error\nelif method_name \u003d\u003d \u0027register_opts\u0027:\n         # At this point we know node.args[0] is not a list\n         # add error","commit_id":"74040d1fdc1a8b8fc5b7cd84c0e14cc2cb0f6f7e"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b1e123699ce4e06e62db77c5372879de8598ef41","unresolved":false,"context_lines":[{"line_number":67,"context_line":"# or CONF.register_opt(XXX_opt)"},{"line_number":68,"context_line":"register_plural_opts \u003d re.compile("},{"line_number":69,"context_line":"    r\"CONF.register_opts\\((?i).+_opts.*\\)\")"},{"line_number":70,"context_line":"register_singular_opt \u003d re.compile("},{"line_number":71,"context_line":"    r\"CONF.register_opt\\((?i).+_opt(?!s).*\\)\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_d6fe0405","line":70,"updated":"2015-10-05 14:10:04.000000000","message":"-1: You are not using these 2 variables","commit_id":"4f6939d954b6e62660d02c8fc975850a5ca9d6a1"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"2f79d288c386ef337cbec336b67e30ec4d921a3e","unresolved":false,"context_lines":[{"line_number":67,"context_line":"# or CONF.register_opt(XXX_opt)"},{"line_number":68,"context_line":"register_plural_opts \u003d re.compile("},{"line_number":69,"context_line":"    r\"CONF.register_opts\\((?i).+_opts.*\\)\")"},{"line_number":70,"context_line":"register_singular_opt \u003d re.compile("},{"line_number":71,"context_line":"    r\"CONF.register_opt\\((?i).+_opt(?!s).*\\)\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_2ab9072f","line":70,"in_reply_to":"7a2fa921_d6fe0405","updated":"2015-10-05 15:46:00.000000000","message":"Done","commit_id":"4f6939d954b6e62660d02c8fc975850a5ca9d6a1"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b1e123699ce4e06e62db77c5372879de8598ef41","unresolved":false,"context_lines":[{"line_number":285,"context_line":"    \"\"\""},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    CHECK_DESC \u003d (\u0027C311: Arguments being passed to register_opt/register_opts \u0027"},{"line_number":288,"context_line":"                  \u0027must be a single option or list of options respectively. \u0027"},{"line_number":289,"context_line":"                  \u0027Options must also end with _opt or _opts respectively.\u0027)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    REGISTER_METHODS \u003d ["}],"source_content_type":"text/x-python","patch_set":8,"id":"9a1a9d01_f34402b8","line":288,"updated":"2015-10-05 14:10:04.000000000","message":"?: Why only a list? Cannot be a tuple?","commit_id":"4f6939d954b6e62660d02c8fc975850a5ca9d6a1"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b6c44a9029ec7bf07036a7b4e42ba6c3d70f72bf","unresolved":false,"context_lines":[{"line_number":285,"context_line":"    \"\"\""},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    CHECK_DESC \u003d (\u0027C311: Arguments being passed to register_opt/register_opts \u0027"},{"line_number":288,"context_line":"                  \u0027must be a single option or list of options respectively. \u0027"},{"line_number":289,"context_line":"                  \u0027Options must also end with _opt or _opts respectively.\u0027)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    REGISTER_METHODS \u003d ["}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_30065821","line":288,"in_reply_to":"7a2fa921_ca8733d6","updated":"2015-10-05 16:16:11.000000000","message":"Well, that\u0027s not entirely true since `register_opts` can take a tuple just fine, but since I\u0027m the only one who would use a tuple instead of a list it doesn\u0027t matter all that much.  ;-)","commit_id":"4f6939d954b6e62660d02c8fc975850a5ca9d6a1"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"2f79d288c386ef337cbec336b67e30ec4d921a3e","unresolved":false,"context_lines":[{"line_number":285,"context_line":"    \"\"\""},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    CHECK_DESC \u003d (\u0027C311: Arguments being passed to register_opt/register_opts \u0027"},{"line_number":288,"context_line":"                  \u0027must be a single option or list of options respectively. \u0027"},{"line_number":289,"context_line":"                  \u0027Options must also end with _opt or _opts respectively.\u0027)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    REGISTER_METHODS \u003d ["}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_ca8733d6","line":288,"in_reply_to":"9a1a9d01_f34402b8","updated":"2015-10-05 15:46:00.000000000","message":"No it can\u0027t be a tuple since register_opts can only take a list. Here\u0027s the oslo documentation if you want to take a look at examples of how it\u0027s used: http://docs.openstack.org/developer/oslo.config/api/oslo.config.cfg.html","commit_id":"4f6939d954b6e62660d02c8fc975850a5ca9d6a1"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b1e123699ce4e06e62db77c5372879de8598ef41","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                  \u0027must be a single option or list of options respectively. \u0027"},{"line_number":289,"context_line":"                  \u0027Options must also end with _opt or _opts respectively.\u0027)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    REGISTER_METHODS \u003d ["},{"line_number":292,"context_line":"        \u0027register_opt\u0027,"},{"line_number":293,"context_line":"        \u0027register_opts\u0027,"},{"line_number":294,"context_line":"    ]"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_36bbb810","line":291,"updated":"2015-10-05 14:10:04.000000000","message":"nit: Should be lowercase, even if it was a constant/immutable object.","commit_id":"4f6939d954b6e62660d02c8fc975850a5ca9d6a1"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"2f79d288c386ef337cbec336b67e30ec4d921a3e","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                  \u0027must be a single option or list of options respectively. \u0027"},{"line_number":289,"context_line":"                  \u0027Options must also end with _opt or _opts respectively.\u0027)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    REGISTER_METHODS \u003d ["},{"line_number":292,"context_line":"        \u0027register_opt\u0027,"},{"line_number":293,"context_line":"        \u0027register_opts\u0027,"},{"line_number":294,"context_line":"    ]"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_4ab6c33e","line":291,"in_reply_to":"7a2fa921_36bbb810","updated":"2015-10-05 15:46:00.000000000","message":"Done","commit_id":"4f6939d954b6e62660d02c8fc975850a5ca9d6a1"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b1e123699ce4e06e62db77c5372879de8598ef41","unresolved":false,"context_lines":[{"line_number":327,"context_line":"            # argument should be a list with register_opts()"},{"line_number":328,"context_line":"            if len(node.args) \u003e 0:"},{"line_number":329,"context_line":"                argument_name \u003d self._find_name(node.args[0])"},{"line_number":330,"context_line":"                if argument_name:"},{"line_number":331,"context_line":"                    if (method_name \u003d\u003d self.REGISTER_METHODS[0] and"},{"line_number":332,"context_line":"                            not argument_name[-3:].lower() \u003d\u003d \u0027opt\u0027):"},{"line_number":333,"context_line":"                        self.add_error(node.args[0])"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_36ef38b2","line":330,"updated":"2015-10-05 14:10:04.000000000","message":"nit: Readability of this if/else could be improved using some variables (like singular_method and plural method) and using method `endswith` instead of [-3:]","commit_id":"4f6939d954b6e62660d02c8fc975850a5ca9d6a1"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"2f79d288c386ef337cbec336b67e30ec4d921a3e","unresolved":false,"context_lines":[{"line_number":327,"context_line":"            # argument should be a list with register_opts()"},{"line_number":328,"context_line":"            if len(node.args) \u003e 0:"},{"line_number":329,"context_line":"                argument_name \u003d self._find_name(node.args[0])"},{"line_number":330,"context_line":"                if argument_name:"},{"line_number":331,"context_line":"                    if (method_name \u003d\u003d self.REGISTER_METHODS[0] and"},{"line_number":332,"context_line":"                            not argument_name[-3:].lower() \u003d\u003d \u0027opt\u0027):"},{"line_number":333,"context_line":"                        self.add_error(node.args[0])"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_4aeec3ed","line":330,"in_reply_to":"7a2fa921_36ef38b2","updated":"2015-10-05 15:46:00.000000000","message":"When method_name is set, we don\u0027t know if it is the singular method form or the plural method form so I would have to add an additional check to set a better variable name.  I can switch using splicing to \u0027endswith\u0027 though- that\u0027s done.","commit_id":"4f6939d954b6e62660d02c8fc975850a5ca9d6a1"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b6c44a9029ec7bf07036a7b4e42ba6c3d70f72bf","unresolved":false,"context_lines":[{"line_number":327,"context_line":"            # argument should be a list with register_opts()"},{"line_number":328,"context_line":"            if len(node.args) \u003e 0:"},{"line_number":329,"context_line":"                argument_name \u003d self._find_name(node.args[0])"},{"line_number":330,"context_line":"                if argument_name:"},{"line_number":331,"context_line":"                    if (method_name \u003d\u003d self.REGISTER_METHODS[0] and"},{"line_number":332,"context_line":"                            not argument_name[-3:].lower() \u003d\u003d \u0027opt\u0027):"},{"line_number":333,"context_line":"                        self.add_error(node.args[0])"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_9022ccb8","line":330,"in_reply_to":"7a2fa921_4aeec3ed","updated":"2015-10-05 16:16:11.000000000","message":"I meant for example:\n\n singular_method \u003d \u0027register_opt\u0027\n plural_method \u003d \u0027register_opts\u0027\n register_methods \u003d (singular_method, plural_method)\n\nAnd then doing\n\n method_name \u003d\u003d singular_method and not ...\n\nThat way it\u0027s easier to know what we are comparing, it was a nit, code looks good.","commit_id":"4f6939d954b6e62660d02c8fc975850a5ca9d6a1"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"57a39b6dcccbbe77f1e722911f6b9710e8c403b1","unresolved":false,"context_lines":[{"line_number":270,"context_line":""},{"line_number":271,"context_line":"class CheckOptRegistrationArgs(BaseASTChecker):"},{"line_number":272,"context_line":"    \"\"\"Check for single opt or list of opts when register_opt() or"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"       register_opts() are being called."},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_1879f7fc","line":273,"updated":"2015-10-05 22:25:29.000000000","message":"I\u0027m seeing a random blank line here - not sure if it\u0027s just in the review tool","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5f3564540e0c956c4c5f6cae38917dcf6c5ccb25","unresolved":false,"context_lines":[{"line_number":270,"context_line":""},{"line_number":271,"context_line":"class CheckOptRegistrationArgs(BaseASTChecker):"},{"line_number":272,"context_line":"    \"\"\"Check for single opt or list of opts when register_opt() or"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"       register_opts() are being called."},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_75633b1b","line":273,"in_reply_to":"7a2fa921_1879f7fc","updated":"2015-10-06 12:09:11.000000000","message":"Good catch, that was probably done to avoid the PEP8 errors.\n\nThis docstring is not correct, on multiline docstring first line should be a standalone summary.","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"df0a1d541823bdf36903b773ecb2c442a72b1416","unresolved":false,"context_lines":[{"line_number":270,"context_line":""},{"line_number":271,"context_line":"class CheckOptRegistrationArgs(BaseASTChecker):"},{"line_number":272,"context_line":"    \"\"\"Check for single opt or list of opts when register_opt() or"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"       register_opts() are being called."},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_2b824201","line":273,"in_reply_to":"7a2fa921_75633b1b","updated":"2015-10-06 13:36:15.000000000","message":"Done","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"57a39b6dcccbbe77f1e722911f6b9710e8c403b1","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    \"\"\"Check for single opt or list of opts when register_opt() or"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"       register_opts() are being called."},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    \"\"\""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    CHECK_DESC \u003d (\u0027C311: Arguments being passed to register_opt/register_opts \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_58776f02","line":275,"updated":"2015-10-05 22:25:29.000000000","message":"^^ ditto","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"df0a1d541823bdf36903b773ecb2c442a72b1416","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    \"\"\"Check for single opt or list of opts when register_opt() or"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"       register_opts() are being called."},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    \"\"\""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    CHECK_DESC \u003d (\u0027C311: Arguments being passed to register_opt/register_opts \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_eb7c4a22","line":275,"in_reply_to":"7a2fa921_58776f02","updated":"2015-10-06 13:36:15.000000000","message":"Done","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"57a39b6dcccbbe77f1e722911f6b9710e8c403b1","unresolved":false,"context_lines":[{"line_number":283,"context_line":"    register_methods \u003d ["},{"line_number":284,"context_line":"        \u0027register_opt\u0027,"},{"line_number":285,"context_line":"        \u0027register_opts\u0027,"},{"line_number":286,"context_line":"    ]"},{"line_number":287,"context_line":"    singular_method \u003d \u0027register_opt\u0027"},{"line_number":288,"context_line":"    multiple_method \u003d \u0027register_opts\u0027"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_b8d803f1","line":286,"updated":"2015-10-05 22:25:29.000000000","message":"I like that you\u0027re saving off these as a variable, and it\u0027s definitely a nit - but I  do like gorka\u0027s original suggestion of sliding up the definition of singular_method and multiple_method and using these to define register_methods (i.e. \"register_methods \u003d [singular_method, multiple_method]\").  \n\nThat way we don\u0027t have those constants defined multiple times","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"df0a1d541823bdf36903b773ecb2c442a72b1416","unresolved":false,"context_lines":[{"line_number":283,"context_line":"    register_methods \u003d ["},{"line_number":284,"context_line":"        \u0027register_opt\u0027,"},{"line_number":285,"context_line":"        \u0027register_opts\u0027,"},{"line_number":286,"context_line":"    ]"},{"line_number":287,"context_line":"    singular_method \u003d \u0027register_opt\u0027"},{"line_number":288,"context_line":"    multiple_method \u003d \u0027register_opts\u0027"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_4bec5ec7","line":286,"in_reply_to":"7a2fa921_b8d803f1","updated":"2015-10-06 13:36:15.000000000","message":"Done","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"57a39b6dcccbbe77f1e722911f6b9710e8c403b1","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        \u0027register_opt\u0027,"},{"line_number":285,"context_line":"        \u0027register_opts\u0027,"},{"line_number":286,"context_line":"    ]"},{"line_number":287,"context_line":"    singular_method \u003d \u0027register_opt\u0027"},{"line_number":288,"context_line":"    multiple_method \u003d \u0027register_opts\u0027"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def _find_name(self, node):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_381dd373","line":287,"updated":"2015-10-05 22:25:29.000000000","message":"plural_method may be a slightly clearer name","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"df0a1d541823bdf36903b773ecb2c442a72b1416","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        \u0027register_opt\u0027,"},{"line_number":285,"context_line":"        \u0027register_opts\u0027,"},{"line_number":286,"context_line":"    ]"},{"line_number":287,"context_line":"    singular_method \u003d \u0027register_opt\u0027"},{"line_number":288,"context_line":"    multiple_method \u003d \u0027register_opts\u0027"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def _find_name(self, node):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_0bcf4657","line":287,"in_reply_to":"7a2fa921_381dd373","updated":"2015-10-06 13:36:15.000000000","message":"Done","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"57a39b6dcccbbe77f1e722911f6b9710e8c403b1","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                    # that are registering the objects directly and not"},{"line_number":334,"context_line":"                    # passing in a variable referencing the options being"},{"line_number":335,"context_line":"                    # registered."},{"line_number":336,"context_line":"                    if (method_name \u003d\u003d self.singular_method and"},{"line_number":337,"context_line":"                            isinstance(node.args[0], ast.List)):"},{"line_number":338,"context_line":"                        self.add_error(node.args[0])"},{"line_number":339,"context_line":"                    elif (method_name \u003d\u003d self.multiple_method and"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_d83a9fe7","line":336,"updated":"2015-10-05 22:25:29.000000000","message":"Since in the message we\u0027re saying it can be a Tuple, shouldn\u0027t this check ast.List and ast.Tuple?","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"df0a1d541823bdf36903b773ecb2c442a72b1416","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                    # that are registering the objects directly and not"},{"line_number":334,"context_line":"                    # passing in a variable referencing the options being"},{"line_number":335,"context_line":"                    # registered."},{"line_number":336,"context_line":"                    if (method_name \u003d\u003d self.singular_method and"},{"line_number":337,"context_line":"                            isinstance(node.args[0], ast.List)):"},{"line_number":338,"context_line":"                        self.add_error(node.args[0])"},{"line_number":339,"context_line":"                    elif (method_name \u003d\u003d self.multiple_method and"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_0bf6668f","line":336,"in_reply_to":"7a2fa921_d5556f1d","updated":"2015-10-06 13:36:15.000000000","message":"Must\u0027ve gotten lost in my branches somewhere. It\u0027s there now.","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5f3564540e0c956c4c5f6cae38917dcf6c5ccb25","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                    # that are registering the objects directly and not"},{"line_number":334,"context_line":"                    # passing in a variable referencing the options being"},{"line_number":335,"context_line":"                    # registered."},{"line_number":336,"context_line":"                    if (method_name \u003d\u003d self.singular_method and"},{"line_number":337,"context_line":"                            isinstance(node.args[0], ast.List)):"},{"line_number":338,"context_line":"                        self.add_error(node.args[0])"},{"line_number":339,"context_line":"                    elif (method_name \u003d\u003d self.multiple_method and"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_d5556f1d","line":336,"in_reply_to":"7a2fa921_d83a9fe7","updated":"2015-10-06 12:09:11.000000000","message":"?: Previous patch had checks for ast.Tuple as well, did you remove it because pep27 failed?","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"bcaad5ec5ae3a0b9a1939ca30892a53254b3e529","unresolved":false,"context_lines":[{"line_number":269,"context_line":""},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"class CheckOptRegistrationArgs(BaseASTChecker):"},{"line_number":272,"context_line":"    \"\"\"Verifying the registration of options are well formed"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    This class creates a check for single opt or list/tuple of"},{"line_number":275,"context_line":"    opts when register_opt() or register_opts() are being called."}],"source_content_type":"text/x-python","patch_set":12,"id":"7a2fa921_6275b4c9","line":272,"updated":"2015-10-06 15:27:11.000000000","message":"Think the summary line of multiline docstrings end with a \".\"","commit_id":"391d18dc640de24d65662444c1c022244b9a6ed5"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"a09d55e6cac11ab534accbc156d0e66a28f6f4c6","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                    # registered."},{"line_number":337,"context_line":"                    if (method_name \u003d\u003d self.singular_method and"},{"line_number":338,"context_line":"                            (isinstance(node.args[0], ast.List)) or"},{"line_number":339,"context_line":"                            isinstance(node.args[0], ast.Tuple)):"},{"line_number":340,"context_line":"                        self.add_error(node.args[0])"},{"line_number":341,"context_line":"                    elif (method_name \u003d\u003d self.plural_method and"},{"line_number":342,"context_line":"                            (not isinstance(node.args[0], ast.List)) or"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a2fa921_376e2030","line":339,"updated":"2015-10-06 15:01:21.000000000","message":"nit: These 2 lines would look better as\n\n isinstance(node.args[0], (ast.List, ast.Tuple)):","commit_id":"391d18dc640de24d65662444c1c022244b9a6ed5"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"a09d55e6cac11ab534accbc156d0e66a28f6f4c6","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                        self.add_error(node.args[0])"},{"line_number":341,"context_line":"                    elif (method_name \u003d\u003d self.plural_method and"},{"line_number":342,"context_line":"                            (not isinstance(node.args[0], ast.List)) or"},{"line_number":343,"context_line":"                            isinstance(node.args[0], ast.Tuple)):"},{"line_number":344,"context_line":"                        self.add_error(node.args[0])"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        return super(CheckOptRegistrationArgs, self).generic_visit(node)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a2fa921_775a5885","line":343,"updated":"2015-10-06 15:01:21.000000000","message":"nit: same here","commit_id":"391d18dc640de24d65662444c1c022244b9a6ed5"}],"cinder/tests/unit/test_hacking.py":[{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"57a39b6dcccbbe77f1e722911f6b9710e8c403b1","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def test_opt_type_registration_args(self):"},{"line_number":179,"context_line":"        checker \u003d checks.CheckOptRegistrationArgs"},{"line_number":180,"context_line":"        code \u003d \"\"\""},{"line_number":181,"context_line":"               CONF.register_opts([opt1, opt2, opt3])"},{"line_number":182,"context_line":"               CONF.register_opt(lonely_opt)"},{"line_number":183,"context_line":"               CONF.register_opts([OPT1, OPT2], group\u003d\"group_of_opts\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_f8167b54","line":180,"updated":"2015-10-05 22:25:29.000000000","message":"If we\u0027re handling tuples may be worth adding a tuple test case here","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"df0a1d541823bdf36903b773ecb2c442a72b1416","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def test_opt_type_registration_args(self):"},{"line_number":179,"context_line":"        checker \u003d checks.CheckOptRegistrationArgs"},{"line_number":180,"context_line":"        code \u003d \"\"\""},{"line_number":181,"context_line":"               CONF.register_opts([opt1, opt2, opt3])"},{"line_number":182,"context_line":"               CONF.register_opt(lonely_opt)"},{"line_number":183,"context_line":"               CONF.register_opts([OPT1, OPT2], group\u003d\"group_of_opts\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_0b23c6be","line":180,"in_reply_to":"7a2fa921_f8167b54","updated":"2015-10-06 13:36:15.000000000","message":"Done","commit_id":"04479a4b4a7a6a81bc1c13e7a2e78078ce60abdc"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"bcaad5ec5ae3a0b9a1939ca30892a53254b3e529","unresolved":false,"context_lines":[{"line_number":181,"context_line":"               CONF.register_opts([opt1, opt2, opt3])"},{"line_number":182,"context_line":"               CONF.register_opt(lonely_opt)"},{"line_number":183,"context_line":"               CONF.register_opts([OPT1, OPT2], group\u003d\"group_of_opts\")"},{"line_number":184,"context_line":"               CONF.register_opt(single_opt, group\u003dblah)"},{"line_number":185,"context_line":"               \"\"\""},{"line_number":186,"context_line":"        self._assert_has_no_errors(code, checker)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a2fa921_e2c1c4e5","line":184,"updated":"2015-10-06 15:27:11.000000000","message":"Thanks for adding the \"tuple\" checks, could be worth a successful tuple check here (where we expect no errors)","commit_id":"391d18dc640de24d65662444c1c022244b9a6ed5"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"be251f84a644f4c0072195121708d5855e8529d3","unresolved":false,"context_lines":[{"line_number":181,"context_line":"               CONF.register_opts([opt1, opt2, opt3])"},{"line_number":182,"context_line":"               CONF.register_opt(lonely_opt)"},{"line_number":183,"context_line":"               CONF.register_opts([OPT1, OPT2], group\u003d\"group_of_opts\")"},{"line_number":184,"context_line":"               CONF.register_opt(single_opt, group\u003dblah)"},{"line_number":185,"context_line":"               \"\"\""},{"line_number":186,"context_line":"        self._assert_has_no_errors(code, checker)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a2fa921_af9bb4c8","line":184,"in_reply_to":"7a2fa921_e2c1c4e5","updated":"2015-10-06 15:42:31.000000000","message":"I have a successful tuple check down on line 204 :)","commit_id":"391d18dc640de24d65662444c1c022244b9a6ed5"}]}
