)]}'
{"oslo_config/cfg.py":[{"author":{"_account_id":9459,"name":".Haifeng Yan","email":"yanheven@qq.com","username":"yan"},"change_message_id":"0f3ef41e3ebc7c62d4ec2096ba42e662282b82b6","unresolved":false,"context_lines":[{"line_number":435,"context_line":"class DuplicateOptError(Error):"},{"line_number":436,"context_line":"    \"\"\"Raised if multiple opts with the same name are registered.\"\"\""},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"    def __init__(self, opt_name\u003d\u0027\u0027, msg\u003dNone):"},{"line_number":439,"context_line":"        self.opt_name \u003d opt_name"},{"line_number":440,"context_line":"        self.msg \u003d msg"},{"line_number":441,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_8e8e1bce","line":438,"range":{"start_line":438,"start_character":31,"end_line":438,"end_character":35},"updated":"2016-07-31 08:45:47.000000000","message":"seems opt_name will never be empty, so does it really need default value?","commit_id":"b2f3b60639825c83d8cf9b597ebbcc275705daa1"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"7828ff14fbab0864c054309e78d662b3586948f0","unresolved":false,"context_lines":[{"line_number":435,"context_line":"class DuplicateOptError(Error):"},{"line_number":436,"context_line":"    \"\"\"Raised if multiple opts with the same name are registered.\"\"\""},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"    def __init__(self, opt_name\u003d\u0027\u0027, msg\u003dNone):"},{"line_number":439,"context_line":"        self.opt_name \u003d opt_name"},{"line_number":440,"context_line":"        self.msg \u003d msg"},{"line_number":441,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_9bbc98bc","line":438,"range":{"start_line":438,"start_character":31,"end_line":438,"end_character":35},"in_reply_to":"bacf61ea_8e8e1bce","updated":"2016-07-31 12:04:45.000000000","message":"We don\u0027t want to pass opt_name in line 2052","commit_id":"b2f3b60639825c83d8cf9b597ebbcc275705daa1"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"3cc7a1bcb0f8b0664cdb8f56083ff36b61457ccf","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        self.msg \u003d msg"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    def __str__(self):"},{"line_number":443,"context_line":"        if self.msg is not None:"},{"line_number":444,"context_line":"            return self.msg"},{"line_number":445,"context_line":"        return \"duplicate option: %s\" % self.opt_name"},{"line_number":446,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_7cf76a59","line":443,"updated":"2016-07-25 13:20:18.000000000","message":"nit: if self.msg:","commit_id":"b2f3b60639825c83d8cf9b597ebbcc275705daa1"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"7828ff14fbab0864c054309e78d662b3586948f0","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        self.msg \u003d msg"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    def __str__(self):"},{"line_number":443,"context_line":"        if self.msg is not None:"},{"line_number":444,"context_line":"            return self.msg"},{"line_number":445,"context_line":"        return \"duplicate option: %s\" % self.opt_name"},{"line_number":446,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_3bcc8c69","line":443,"in_reply_to":"bacf61ea_4e53836b","updated":"2016-07-31 12:04:45.000000000","message":"we usually use \u0027is\u0027 like statement when comparing with value None","commit_id":"b2f3b60639825c83d8cf9b597ebbcc275705daa1"},{"author":{"_account_id":9459,"name":".Haifeng Yan","email":"yanheven@qq.com","username":"yan"},"change_message_id":"0f3ef41e3ebc7c62d4ec2096ba42e662282b82b6","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        self.msg \u003d msg"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    def __str__(self):"},{"line_number":443,"context_line":"        if self.msg is not None:"},{"line_number":444,"context_line":"            return self.msg"},{"line_number":445,"context_line":"        return \"duplicate option: %s\" % self.opt_name"},{"line_number":446,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_4e53836b","line":443,"in_reply_to":"dada55a8_7cf76a59","updated":"2016-07-31 08:45:47.000000000","message":"IMHO, \"if self.msg is not None\" is the best one,","commit_id":"b2f3b60639825c83d8cf9b597ebbcc275705daa1"},{"author":{"_account_id":9459,"name":".Haifeng Yan","email":"yanheven@qq.com","username":"yan"},"change_message_id":"61734674a168efbc8959cd6e8a142e2d5c85f988","unresolved":false,"context_lines":[{"line_number":2049,"context_line":"                    container.add_argument(*argument[\u0027args\u0027],"},{"line_number":2050,"context_line":"                                           **argument[\u0027kwargs\u0027])"},{"line_number":2051,"context_line":"                except argparse.ArgumentError as e:"},{"line_number":2052,"context_line":"                    raise DuplicateOptError(msg\u003dstr(e))"},{"line_number":2053,"context_line":"        self._args_cache \u003d {}"},{"line_number":2054,"context_line":""},{"line_number":2055,"context_line":"    def parse_args(self, args\u003dNone, namespace\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_9e6486b9","line":2052,"range":{"start_line":2052,"start_character":26,"end_line":2052,"end_character":43},"updated":"2016-07-31 13:32:31.000000000","message":"msg from argparse.ArgumentError: argument xxxx: conflicting option string(s): xxxx\nthe format is different from DuplicateOptError: duplicate option: xxxx, so the same type of error has 2 format of msg, a little weird.\nhow about:\nargs \u003d argument[\u0027args\u0027]\nopt_name \u003d  \u0027, \u0027.join(args) if isinstance(list) else args\nraise DuplicateOptError(opt_name)","commit_id":"b2f3b60639825c83d8cf9b597ebbcc275705daa1"},{"author":{"_account_id":9459,"name":".Haifeng Yan","email":"yanheven@qq.com","username":"yan"},"change_message_id":"3aea76b904e7eddcea02f3bb653d617bae258d5e","unresolved":false,"context_lines":[{"line_number":2049,"context_line":"                    container.add_argument(*argument[\u0027args\u0027],"},{"line_number":2050,"context_line":"                                           **argument[\u0027kwargs\u0027])"},{"line_number":2051,"context_line":"                except argparse.ArgumentError as e:"},{"line_number":2052,"context_line":"                    raise DuplicateOptError(msg\u003dstr(e))"},{"line_number":2053,"context_line":"        self._args_cache \u003d {}"},{"line_number":2054,"context_line":""},{"line_number":2055,"context_line":"    def parse_args(self, args\u003dNone, namespace\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_bd9ae511","line":2052,"range":{"start_line":2052,"start_character":26,"end_line":2052,"end_character":43},"in_reply_to":"bacf61ea_5d75a961","updated":"2016-08-02 08:54:11.000000000","message":"if seems all opts name are in argument[\u0027args\u0027],\nargument[\u0027kwags\u0027] are such as: type, help, etc.","commit_id":"b2f3b60639825c83d8cf9b597ebbcc275705daa1"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"ed5b66370ad69ed4077cd212a903a9e38eaaf120","unresolved":false,"context_lines":[{"line_number":2049,"context_line":"                    container.add_argument(*argument[\u0027args\u0027],"},{"line_number":2050,"context_line":"                                           **argument[\u0027kwargs\u0027])"},{"line_number":2051,"context_line":"                except argparse.ArgumentError as e:"},{"line_number":2052,"context_line":"                    raise DuplicateOptError(msg\u003dstr(e))"},{"line_number":2053,"context_line":"        self._args_cache \u003d {}"},{"line_number":2054,"context_line":""},{"line_number":2055,"context_line":"    def parse_args(self, args\u003dNone, namespace\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_5d75a961","line":2052,"range":{"start_line":2052,"start_character":26,"end_line":2052,"end_character":43},"in_reply_to":"bacf61ea_9e6486b9","updated":"2016-08-02 08:44:58.000000000","message":"Should we include argument[\u0027kwags\u0027]? if we use error message like \"duplicate option: XXX\", we should ensure XXX with exact value, not put everything in the error message, otherwise that will confuse users.","commit_id":"b2f3b60639825c83d8cf9b597ebbcc275705daa1"},{"author":{"_account_id":9459,"name":".Haifeng Yan","email":"yanheven@qq.com","username":"yan"},"change_message_id":"f2901a4a8590861a9d57605af01b56b3ddc43c3e","unresolved":false,"context_lines":[{"line_number":2049,"context_line":"                    container.add_argument(*argument[\u0027args\u0027],"},{"line_number":2050,"context_line":"                                           **argument[\u0027kwargs\u0027])"},{"line_number":2051,"context_line":"                except argparse.ArgumentError as e:"},{"line_number":2052,"context_line":"                    raise DuplicateOptError(msg\u003dstr(e))"},{"line_number":2053,"context_line":"        self._args_cache \u003d {}"},{"line_number":2054,"context_line":""},{"line_number":2055,"context_line":"    def parse_args(self, args\u003dNone, namespace\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_de25e10a","line":2052,"range":{"start_line":2052,"start_character":26,"end_line":2052,"end_character":43},"in_reply_to":"bacf61ea_9e6486b9","updated":"2016-08-03 01:35:49.000000000","message":"argument[\u0027args\u0027] is always a tuple, so my advice\n\nopt_name \u003d  \u0027, \u0027.join(args)\n\nis enough, don\u0027t need to check type","commit_id":"b2f3b60639825c83d8cf9b597ebbcc275705daa1"},{"author":{"_account_id":9459,"name":".Haifeng Yan","email":"yanheven@qq.com","username":"yan"},"change_message_id":"80b6afbce803029a0913b98465b0430d5146cbfc","unresolved":false,"context_lines":[{"line_number":2044,"context_line":"                    container.add_argument(*argument[\u0027args\u0027],"},{"line_number":2045,"context_line":"                                           **argument[\u0027kwargs\u0027])"},{"line_number":2046,"context_line":"                except argparse.ArgumentError:"},{"line_number":2047,"context_line":"                    options \u003d \u0027,\u0027.join(argument[\u0027args\u0027])"},{"line_number":2048,"context_line":"                    raise DuplicateOptError(options)"},{"line_number":2049,"context_line":"        self._args_cache \u003d {}"},{"line_number":2050,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_a504d514","line":2047,"range":{"start_line":2047,"start_character":31,"end_line":2047,"end_character":32},"updated":"2016-08-05 08:24:43.000000000","message":"insert blank space, such as \u0027, \u0027 would raise readability","commit_id":"1f7d92649ce9294c3294e4d422a5966e5f7122ad"}],"oslo_config/tests/test_cfg.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"8f1d0f62b98432070da20ace242ed1fff066e24d","unresolved":false,"context_lines":[{"line_number":3244,"context_line":""},{"line_number":3245,"context_line":"    def test_error_duplicate(self):"},{"line_number":3246,"context_line":"        self.conf.register_cli_opt(cfg.StrOpt(\u0027foo\u0027, help\u003d\u0027bar\u0027))"},{"line_number":3247,"context_line":"        self.assertRaisesRegexp(cfg.DuplicateOptError, \u0027duplicate option: .*\u0027,"},{"line_number":3248,"context_line":"                                self.conf.register_cli_opt, cfg.StrOpt(\u0027foo\u0027))"},{"line_number":3249,"context_line":""},{"line_number":3250,"context_line":"    def test_error_duplicate_with_different_dest(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_62b3770b","line":3247,"updated":"2016-08-12 20:17:10.000000000","message":"I don\u0027t understand why the tests needed to change, can you explain?","commit_id":"faa013d89af3f57308c577a440ce1d2adce364b9"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"b2a79afb5a43e834c1bbeec0c4b5ce0c89abfa18","unresolved":false,"context_lines":[{"line_number":3244,"context_line":""},{"line_number":3245,"context_line":"    def test_error_duplicate(self):"},{"line_number":3246,"context_line":"        self.conf.register_cli_opt(cfg.StrOpt(\u0027foo\u0027, help\u003d\u0027bar\u0027))"},{"line_number":3247,"context_line":"        self.assertRaisesRegexp(cfg.DuplicateOptError, \u0027duplicate option: .*\u0027,"},{"line_number":3248,"context_line":"                                self.conf.register_cli_opt, cfg.StrOpt(\u0027foo\u0027))"},{"line_number":3249,"context_line":""},{"line_number":3250,"context_line":"    def test_error_duplicate_with_different_dest(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ac371cc_0bb63e8a","line":3247,"in_reply_to":"9ad45d7e_62b3770b","updated":"2016-08-14 12:43:22.000000000","message":"I tried to verify DuplicateOptError message\u0027s context in previous patchsets. Don\u0027t this any more.","commit_id":"faa013d89af3f57308c577a440ce1d2adce364b9"}]}
