)]}'
{"oslo_config/tests/test_types.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"55865eade4aca6b21570960320fd176c226e5e83","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    def test_regex_and_ignore_case(self):"},{"line_number":141,"context_line":"        self.type_instance \u003d types.String(regex\u003dre.compile(\"^[A-Z]\"),"},{"line_number":142,"context_line":"                                          ignore_case\u003dTrue)"},{"line_number":143,"context_line":"        self.assertConvertedValue(\"foo\", \"foo\")"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"class BooleanTypeTests(TypeTestHelper, unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_4edaec79","line":143,"updated":"2015-10-07 16:09:38.000000000","message":"I think need case where the regex is a string.\n\nAnd also test regex with ignore_case\u003dFalse and make sure doesn\u0027t match, what would be matched with ignore_case\u003dTrue.","commit_id":"5ea71876f5b581abf50ba8e7662f835fc2545988"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"28184c8a5ce1fa0850894dffa3652006456a816c","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    def test_regex_and_ignore_case(self):"},{"line_number":141,"context_line":"        self.type_instance \u003d types.String(regex\u003dre.compile(\"^[A-Z]\"),"},{"line_number":142,"context_line":"                                          ignore_case\u003dTrue)"},{"line_number":143,"context_line":"        self.assertConvertedValue(\"foo\", \"foo\")"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"class BooleanTypeTests(TypeTestHelper, unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_ae9620ee","line":143,"in_reply_to":"7a2fa921_2efbf0c2","updated":"2015-10-07 16:19:52.000000000","message":"Agreed on test_regex covering it.  Thanks!","commit_id":"5ea71876f5b581abf50ba8e7662f835fc2545988"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9458163e6c97657fa9a43074444cc0fdba5bf107","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    def test_regex_and_ignore_case(self):"},{"line_number":141,"context_line":"        self.type_instance \u003d types.String(regex\u003dre.compile(\"^[A-Z]\"),"},{"line_number":142,"context_line":"                                          ignore_case\u003dTrue)"},{"line_number":143,"context_line":"        self.assertConvertedValue(\"foo\", \"foo\")"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"class BooleanTypeTests(TypeTestHelper, unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_2efbf0c2","line":143,"in_reply_to":"7a2fa921_4edaec79","updated":"2015-10-07 16:11:19.000000000","message":"Right will add for the string... For the False I was thinking that test_regex_fails() already covers it. WDYT?","commit_id":"5ea71876f5b581abf50ba8e7662f835fc2545988"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"549fd459ea857687cf659aebb39fcdff1724d025","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    def test_regex_and_ignore_case_str(self):"},{"line_number":146,"context_line":"        self.type_instance \u003d types.String(regex\u003d\"^[A-Z]\", ignore_case\u003dTrue)"},{"line_number":147,"context_line":"        self.assertConvertedValue(\"foo\", \"foo\")"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"class BooleanTypeTests(TypeTestHelper, unittest.TestCase):"},{"line_number":151,"context_line":"    type \u003d types.Boolean()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_93efcc86","line":148,"updated":"2015-10-07 16:47:31.000000000","message":"I think the code handles this, but maybe a test case where:\n\n regex\u003dre.compile(\"^[A-Z]\u0027, re.I)  ignore_case\u003dFalse\n\nMake sure the default value of ignore_case doesn\u0027t over-ride if the user uses re.I.\n\nI didn\u0027t see a test case using re.I","commit_id":"37b120a84a6605e4b39bd5cdd1f943f936da3fcc"}],"oslo_config/types.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"319fc257558b576fecaf53f2b642e3d756cdc3ca","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def __init__(self, choices\u003dNone, quotes\u003dFalse, regex\u003dNone,"},{"line_number":59,"context_line":"                 ignore_case\u003dFalse):"},{"line_number":60,"context_line":"        super(String, self).__init__()"},{"line_number":61,"context_line":"        if (choices or ignore_case) and regex:"},{"line_number":62,"context_line":"            raise ValueError(\"\u0027choices\u0027 or \u0027ignore_case\u0027 cannot both be \""},{"line_number":63,"context_line":"                             \"specified with \u0027regex\u0027\")"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_02e28b9f","line":61,"updated":"2015-10-07 15:16:51.000000000","message":"Maybe ignore_case could be used with regex?\n\nIf ignore_case add re.I to the re.compile below.","commit_id":"3aef7bd9ed5e8fa74c26dbc03c299610270bd81e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bb5f1105f9e2f27e546221ecbff5f7ced3f773f4","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def __init__(self, choices\u003dNone, quotes\u003dFalse, regex\u003dNone,"},{"line_number":59,"context_line":"                 ignore_case\u003dFalse):"},{"line_number":60,"context_line":"        super(String, self).__init__()"},{"line_number":61,"context_line":"        if (choices or ignore_case) and regex:"},{"line_number":62,"context_line":"            raise ValueError(\"\u0027choices\u0027 or \u0027ignore_case\u0027 cannot both be \""},{"line_number":63,"context_line":"                             \"specified with \u0027regex\u0027\")"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_fd6db498","line":61,"in_reply_to":"7a2fa921_02e28b9f","updated":"2015-10-07 15:21:15.000000000","message":"++ that\u0027s a great suggestion. I will do that","commit_id":"3aef7bd9ed5e8fa74c26dbc03c299610270bd81e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7dfbaa48ec290047b91739dbc04434b232e27aa8","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def __init__(self, choices\u003dNone, quotes\u003dFalse, regex\u003dNone,"},{"line_number":59,"context_line":"                 ignore_case\u003dFalse):"},{"line_number":60,"context_line":"        super(String, self).__init__()"},{"line_number":61,"context_line":"        if (choices or ignore_case) and regex:"},{"line_number":62,"context_line":"            raise ValueError(\"\u0027choices\u0027 or \u0027ignore_case\u0027 cannot both be \""},{"line_number":63,"context_line":"                             \"specified with \u0027regex\u0027\")"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_5dcb8872","line":61,"in_reply_to":"7a2fa921_02e28b9f","updated":"2015-10-07 15:25:52.000000000","message":"+1","commit_id":"3aef7bd9ed5e8fa74c26dbc03c299610270bd81e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7dfbaa48ec290047b91739dbc04434b232e27aa8","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            return value"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        # Check for case insensitive"},{"line_number":86,"context_line":"        _choices \u003d self.choices"},{"line_number":87,"context_line":"        _value \u003d value"},{"line_number":88,"context_line":"        if self.ignore_case:"},{"line_number":89,"context_line":"            _value \u003d value.lower()"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_1dc5105a","line":86,"updated":"2015-10-07 15:25:52.000000000","message":"There\u0027s no need to prefix variable names with _ inside a function scope.","commit_id":"3aef7bd9ed5e8fa74c26dbc03c299610270bd81e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7dfbaa48ec290047b91739dbc04434b232e27aa8","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        _value \u003d value"},{"line_number":88,"context_line":"        if self.ignore_case:"},{"line_number":89,"context_line":"            _value \u003d value.lower()"},{"line_number":90,"context_line":"            _choices \u003d [c.lower() for c in self.choices]"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        if _value in _choices:"},{"line_number":93,"context_line":"            return value"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_dd93184e","line":90,"updated":"2015-10-07 15:25:52.000000000","message":"The case-insensitive version of choices can be built in __init__ so it is only computed once instead of each time the option is set. That would let you leave this logic alone, except to refer to the different variable.","commit_id":"3aef7bd9ed5e8fa74c26dbc03c299610270bd81e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7957aa236ccbf685adebd6b46d367b8d085ddebd","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.ignore_case \u003d ignore_case"},{"line_number":65,"context_line":"        self.quotes \u003d quotes"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        if choices is not None and self.ignore_case:"},{"line_number":68,"context_line":"            self.choices \u003d [c.lower() for c in choices]"},{"line_number":69,"context_line":"        else:"},{"line_number":70,"context_line":"            self.choices \u003d choices"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_8e456418","line":67,"updated":"2015-10-07 16:11:17.000000000","message":"Do we need to store the original choices as well as the lower-cased versions so we can use the original values when generating the example configuration file?","commit_id":"5ea71876f5b581abf50ba8e7662f835fc2545988"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f5168f1fa9494c2ee4fa77c1b819a6ff675c6fc3","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.ignore_case \u003d ignore_case"},{"line_number":65,"context_line":"        self.quotes \u003d quotes"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        if choices is not None and self.ignore_case:"},{"line_number":68,"context_line":"            self.choices \u003d [c.lower() for c in choices]"},{"line_number":69,"context_line":"        else:"},{"line_number":70,"context_line":"            self.choices \u003d choices"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_2efa1076","line":67,"in_reply_to":"7a2fa921_8e456418","updated":"2015-10-07 16:15:14.000000000","message":"Right, yeah that would be good. Will do that","commit_id":"5ea71876f5b581abf50ba8e7662f835fc2545988"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7957aa236ccbf685adebd6b46d367b8d085ddebd","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            return value"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        # Check for case insensitive"},{"line_number":98,"context_line":"        p_value \u003d value.lower() if self.ignore_case else value"},{"line_number":99,"context_line":"        if p_value in self.choices:"},{"line_number":100,"context_line":"            return value"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_8e13240d","line":98,"updated":"2015-10-07 16:11:17.000000000","message":"What does \"p_\" mean?","commit_id":"5ea71876f5b581abf50ba8e7662f835fc2545988"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f5168f1fa9494c2ee4fa77c1b819a6ff675c6fc3","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            return value"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        # Check for case insensitive"},{"line_number":98,"context_line":"        p_value \u003d value.lower() if self.ignore_case else value"},{"line_number":99,"context_line":"        if p_value in self.choices:"},{"line_number":100,"context_line":"            return value"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_aede200f","line":98,"in_reply_to":"7a2fa921_8e13240d","updated":"2015-10-07 16:15:14.000000000","message":"processed... naming is hard :-( \n\n\"There are only two hard problems in Computer Science: cache invalidation and naming things\"","commit_id":"5ea71876f5b581abf50ba8e7662f835fc2545988"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"2a3e99ea8f522e5e5f78e3bebbbb111ba08f3071","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            return value"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        # Check for case insensitive"},{"line_number":98,"context_line":"        p_value \u003d value.lower() if self.ignore_case else value"},{"line_number":99,"context_line":"        if p_value in self.choices:"},{"line_number":100,"context_line":"            return value"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_1022d252","line":98,"in_reply_to":"7a2fa921_aede200f","updated":"2015-10-07 16:29:09.000000000","message":"OK. Python\u0027s name lookup uses a dict, so we don\u0027t have any benefit to using shorter names. Spelling it out makes it easier for a human reader to understand.","commit_id":"5ea71876f5b581abf50ba8e7662f835fc2545988"}]}
