)]}'
{"oslo/config/cfg.py":[{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"b1ec6c8ef37bfae9513eadd08f023cdd20480ad7","unresolved":false,"context_lines":[{"line_number":515,"context_line":"    def __init__(self, name, dest\u003dNone, short\u003dNone, default\u003dNone,"},{"line_number":516,"context_line":"                 positional\u003dFalse, metavar\u003dNone, help\u003dNone,"},{"line_number":517,"context_line":"                 secret\u003dFalse, required\u003dFalse,"},{"line_number":518,"context_line":"                 deprecated_name\u003dNone, deprecated_group\u003dNone, allowed\u003dNone):"},{"line_number":519,"context_line":"        \"\"\"Construct an Opt object."},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        The only required parameter is the option\u0027s name. However, it is"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2Fui4%3D","line":518,"updated":"2013-04-01 03:07:21.000000000","message":"How about using \"valid_values\" instead? I had to come back up here because the meaning of \"self.allowed\" was kind of ambiguous as it sounds like a flag.","commit_id":"6bc7276b416d77d9db6a48eddc24a69d9a6026c5"},{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"b1ec6c8ef37bfae9513eadd08f023cdd20480ad7","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        :param help: an explanation of how the option is used"},{"line_number":531,"context_line":"        :param secret: true iff the value should be obfuscated in log output"},{"line_number":532,"context_line":"        :param required: true iff a value must be supplied for this option"},{"line_number":533,"context_line":"        :param deprecated_name: deprecated name option.  Acts like an alias"},{"line_number":534,"context_line":"        :param deprecated_group: the group containing a deprecated alias"},{"line_number":535,"context_line":"        \"\"\""},{"line_number":536,"context_line":"        self.name \u003d name"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2Fuiw%3D","line":533,"updated":"2013-04-01 03:07:21.000000000","message":"needs comment about the new arg","commit_id":"6bc7276b416d77d9db6a48eddc24a69d9a6026c5"},{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"b1ec6c8ef37bfae9513eadd08f023cdd20480ad7","unresolved":false,"context_lines":[{"line_number":710,"context_line":"    \"\"\""},{"line_number":711,"context_line":"    def _check_valid_values(self, value):"},{"line_number":712,"context_line":"        if (self.allowed and"},{"line_number":713,"context_line":"            isinstance(value, basestring) and"},{"line_number":714,"context_line":"            value not in self.allowed):"},{"line_number":715,"context_line":"            message \u003d (\u0027Invalid value: %r (choose from %s)\u0027 %"},{"line_number":716,"context_line":"                      (value, \u0027, \u0027.join(map(repr, self.allowed))))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2Fuig%3D","line":713,"updated":"2013-04-01 03:07:21.000000000","message":"Do we need this validation? Only devs have access to \"value\" and I think this is also handled below.","commit_id":"6bc7276b416d77d9db6a48eddc24a69d9a6026c5"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"8f8bc071d37c6713ea6b3003364291157bb8b39c","unresolved":false,"context_lines":[{"line_number":515,"context_line":"    def __init__(self, name, dest\u003dNone, short\u003dNone, default\u003dNone,"},{"line_number":516,"context_line":"                 positional\u003dFalse, metavar\u003dNone, help\u003dNone,"},{"line_number":517,"context_line":"                 secret\u003dFalse, required\u003dFalse,"},{"line_number":518,"context_line":"                 deprecated_name\u003dNone, deprecated_group\u003dNone, allowed\u003dNone):"},{"line_number":519,"context_line":"        \"\"\"Construct an Opt object."},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        The only required parameter is the option\u0027s name. However, it is"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FuVQ%3D","line":518,"updated":"2013-04-01 14:13:30.000000000","message":"I\u0027m not sure that argument name is sufficiently clear. My first thought was, is that \"is allowed\" or \"allowed values\". Argparse calls it choices, to make clear that it should be a list or set, rather than a boolean. How about either \"allowed_values\" or \"choices\"?","commit_id":"19abf88db100b28e775c50c817cb5a1df6fbebc6"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"12fbb7cee32e7513fcb4e61b408814a62b91f380","unresolved":false,"context_lines":[{"line_number":515,"context_line":"    def __init__(self, name, dest\u003dNone, short\u003dNone, default\u003dNone,"},{"line_number":516,"context_line":"                 positional\u003dFalse, metavar\u003dNone, help\u003dNone,"},{"line_number":517,"context_line":"                 secret\u003dFalse, required\u003dFalse,"},{"line_number":518,"context_line":"                 deprecated_name\u003dNone, deprecated_group\u003dNone, allowed\u003dNone):"},{"line_number":519,"context_line":"        \"\"\"Construct an Opt object."},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        The only required parameter is the option\u0027s name. However, it is"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FuKg%3D","line":518,"in_reply_to":"AAAAOH%2F%2FuVQ%3D","updated":"2013-04-01 18:16:14.000000000","message":"k switching to \"choices\"","commit_id":"19abf88db100b28e775c50c817cb5a1df6fbebc6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"8f8bc071d37c6713ea6b3003364291157bb8b39c","unresolved":false,"context_lines":[{"line_number":516,"context_line":"                 positional\u003dFalse, metavar\u003dNone, help\u003dNone,"},{"line_number":517,"context_line":"                 secret\u003dFalse, required\u003dFalse,"},{"line_number":518,"context_line":"                 deprecated_name\u003dNone, deprecated_group\u003dNone, allowed\u003dNone):"},{"line_number":519,"context_line":"        \"\"\"Construct an Opt object."},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        The only required parameter is the option\u0027s name. However, it is"},{"line_number":522,"context_line":"        common to also supply a default and help string for all options."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FuVA%3D","line":519,"updated":"2013-04-01 14:13:30.000000000","message":"Since the base class doesn\u0027t need the new parameter, should it be part of this constructor? Or should it go in the StrOpt class?","commit_id":"19abf88db100b28e775c50c817cb5a1df6fbebc6"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"12fbb7cee32e7513fcb4e61b408814a62b91f380","unresolved":false,"context_lines":[{"line_number":516,"context_line":"                 positional\u003dFalse, metavar\u003dNone, help\u003dNone,"},{"line_number":517,"context_line":"                 secret\u003dFalse, required\u003dFalse,"},{"line_number":518,"context_line":"                 deprecated_name\u003dNone, deprecated_group\u003dNone, allowed\u003dNone):"},{"line_number":519,"context_line":"        \"\"\"Construct an Opt object."},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        The only required parameter is the option\u0027s name. However, it is"},{"line_number":522,"context_line":"        common to also supply a default and help string for all options."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FuJ8%3D","line":519,"in_reply_to":"AAAAOH%2F%2FuVA%3D","updated":"2013-04-01 18:16:14.000000000","message":"Moved it to StrOpt","commit_id":"19abf88db100b28e775c50c817cb5a1df6fbebc6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"8f8bc071d37c6713ea6b3003364291157bb8b39c","unresolved":false,"context_lines":[{"line_number":556,"context_line":"    def __ne__(self, another):"},{"line_number":557,"context_line":"        return vars(self) !\u003d vars(another)"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def _check_valid_values(self, value):"},{"line_number":560,"context_line":"        return value"},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"    def _get_from_config_parser(self, cparser, section):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FuU8%3D","line":559,"updated":"2013-04-01 14:13:30.000000000","message":"Since this is the base class, it would be helpful to have a docstring here explaining what subclasses are supposed to (and allowed to) do when they override this method.","commit_id":"19abf88db100b28e775c50c817cb5a1df6fbebc6"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"12fbb7cee32e7513fcb4e61b408814a62b91f380","unresolved":false,"context_lines":[{"line_number":556,"context_line":"    def __ne__(self, another):"},{"line_number":557,"context_line":"        return vars(self) !\u003d vars(another)"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def _check_valid_values(self, value):"},{"line_number":560,"context_line":"        return value"},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"    def _get_from_config_parser(self, cparser, section):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FuJc%3D","line":559,"in_reply_to":"AAAAOH%2F%2FuU8%3D","updated":"2013-04-01 18:16:14.000000000","message":"Done","commit_id":"19abf88db100b28e775c50c817cb5a1df6fbebc6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"8f8bc071d37c6713ea6b3003364291157bb8b39c","unresolved":false,"context_lines":[{"line_number":1557,"context_line":"            else:"},{"line_number":1558,"context_line":"                if not opt.multi:"},{"line_number":1559,"context_line":"                    # No need to continue since the last value wins"},{"line_number":1560,"context_line":"                    return opt._check_valid_values(value[-1])"},{"line_number":1561,"context_line":"                values.extend(value)"},{"line_number":1562,"context_line":""},{"line_number":1563,"context_line":"        name \u003d name if group is None else group.name + \u0027_\u0027 + name"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2FuU4%3D","line":1560,"updated":"2013-04-01 14:13:30.000000000","message":"The fact that updating this method required 5 new calls to the validator makes me wonder if there shouldn\u0027t be 2 levels. A _do_get_internal() that gets the raw setting from the option, and then _do_get() to validate that value in one place before returning it. For example, above this point there are 3 other return statements that are not validating the value. Should they?","commit_id":"19abf88db100b28e775c50c817cb5a1df6fbebc6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"c01937bce540cf9af2fa6164c8ccc90c7f45322d","unresolved":false,"context_lines":[{"line_number":710,"context_line":"class StrOpt(Opt):"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"    \"\"\""},{"line_number":713,"context_line":"    In addition to the parameters in the base class Opt, Strip has an"},{"line_number":714,"context_line":"    additional parameter."},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"    allowed: a list of valid values"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOH%2F%2FuEg%3D","line":713,"updated":"2013-04-01 19:03:16.000000000","message":"Should \"Strip\" be \"StrOp\"?","commit_id":"96f12b1ae0476f1e28508a943f757b89fdac2eea"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"d7fc82cc76f526d87669d571bcc68465afa6741e","unresolved":false,"context_lines":[{"line_number":710,"context_line":"class StrOpt(Opt):"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"    \"\"\""},{"line_number":713,"context_line":"    In addition to the parameters in the base class Opt, Strip has an"},{"line_number":714,"context_line":"    additional parameter."},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"    allowed: a list of valid values"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOH%2F%2FuDo%3D","line":713,"in_reply_to":"AAAAOH%2F%2FuEg%3D","updated":"2013-04-01 19:05:46.000000000","message":"Done","commit_id":"96f12b1ae0476f1e28508a943f757b89fdac2eea"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"c01937bce540cf9af2fa6164c8ccc90c7f45322d","unresolved":false,"context_lines":[{"line_number":713,"context_line":"    In addition to the parameters in the base class Opt, Strip has an"},{"line_number":714,"context_line":"    additional parameter."},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"    allowed: a list of valid values"},{"line_number":717,"context_line":"    \"\"\""},{"line_number":718,"context_line":"    def __init__(self, name, choices\u003dNone, **kwargs):"},{"line_number":719,"context_line":"        self.choices \u003d choices"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOH%2F%2FuEc%3D","line":716,"updated":"2013-04-01 19:03:16.000000000","message":"\"allowed\" should be \"choices\"\n\nIf you use the rst formatting, the docstring will look better in the documentation.\n\n  :param choices: Optional sequence of valid values.","commit_id":"96f12b1ae0476f1e28508a943f757b89fdac2eea"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"d7fc82cc76f526d87669d571bcc68465afa6741e","unresolved":false,"context_lines":[{"line_number":713,"context_line":"    In addition to the parameters in the base class Opt, Strip has an"},{"line_number":714,"context_line":"    additional parameter."},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"    allowed: a list of valid values"},{"line_number":717,"context_line":"    \"\"\""},{"line_number":718,"context_line":"    def __init__(self, name, choices\u003dNone, **kwargs):"},{"line_number":719,"context_line":"        self.choices \u003d choices"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOH%2F%2FuDs%3D","line":716,"in_reply_to":"AAAAOH%2F%2FuEc%3D","updated":"2013-04-01 19:05:46.000000000","message":"Done","commit_id":"96f12b1ae0476f1e28508a943f757b89fdac2eea"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"37ddd98f5c64040663749b9c9b9a020cf0b60ce4","unresolved":false,"context_lines":[{"line_number":719,"context_line":"    def __init__(self, name, choices\u003dNone, **kwargs):"},{"line_number":720,"context_line":"        self.choices \u003d choices"},{"line_number":721,"context_line":"        super(StrOpt, self).__init__(name, **kwargs)"},{"line_number":722,"context_line":""},{"line_number":723,"context_line":"    \"\"\""},{"line_number":724,"context_line":"    String opts do not have their values transformed and are returned as"},{"line_number":725,"context_line":"    str objects."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FyKk%3D","line":722,"updated":"2013-04-23 15:28:04.000000000","message":"I\u0027d like argparse to enforce this for the CLI by doing e.g.\n\n    def _get_argparse_kwargs(self, group, **kwargs):\n        \"\"\"Extends the base argparse keyword dict for choices handling.\"\"\"\n        return super(StrOpt,\n                     self)._get_argparse_kwargs(group,\n                                                choices\u003dself.choices,\n                                                **kwargs)\n\n\nthis will mean that the choices will be included in the help string etc.","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"e8b20b72393a0b41423d6a2b2c2c716bfa9e931e","unresolved":false,"context_lines":[{"line_number":719,"context_line":"    def __init__(self, name, choices\u003dNone, **kwargs):"},{"line_number":720,"context_line":"        self.choices \u003d choices"},{"line_number":721,"context_line":"        super(StrOpt, self).__init__(name, **kwargs)"},{"line_number":722,"context_line":""},{"line_number":723,"context_line":"    \"\"\""},{"line_number":724,"context_line":"    String opts do not have their values transformed and are returned as"},{"line_number":725,"context_line":"    str objects."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FT5I%3D","line":722,"in_reply_to":"AAAAOn%2F%2FyKk%3D","updated":"2013-05-15 01:28:50.000000000","message":"Done","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"37ddd98f5c64040663749b9c9b9a020cf0b60ce4","unresolved":false,"context_lines":[{"line_number":729,"context_line":"            value not in self.choices):"},{"line_number":730,"context_line":"            message \u003d (\u0027Invalid value: %r (choose from %s)\u0027 %"},{"line_number":731,"context_line":"                      (value, \u0027, \u0027.join(map(repr, self.choices))))"},{"line_number":732,"context_line":"            raise ValueError(message)"},{"line_number":733,"context_line":"        return value"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FyJE%3D","line":732,"updated":"2013-04-23 15:28:04.000000000","message":"I think I\u0027d prefer an oslo.config specific exception which includes the detail of the option as attributes on the exception - see e.g. NoSuchOptError","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"e8b20b72393a0b41423d6a2b2c2c716bfa9e931e","unresolved":false,"context_lines":[{"line_number":729,"context_line":"            value not in self.choices):"},{"line_number":730,"context_line":"            message \u003d (\u0027Invalid value: %r (choose from %s)\u0027 %"},{"line_number":731,"context_line":"                      (value, \u0027, \u0027.join(map(repr, self.choices))))"},{"line_number":732,"context_line":"            raise ValueError(message)"},{"line_number":733,"context_line":"        return value"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FT5A%3D","line":732,"in_reply_to":"AAAAOn%2F%2FyJE%3D","updated":"2013-05-15 01:28:50.000000000","message":"will tackle ValueError in a later patch if that\u0027s ok since we do use that already as you mentioned in the comment below","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"37ddd98f5c64040663749b9c9b9a020cf0b60ce4","unresolved":false,"context_lines":[{"line_number":755,"context_line":"        \"\"\"Retrieve the opt value as a boolean from ConfigParser.\"\"\""},{"line_number":756,"context_line":"        def convert_bool(v):"},{"line_number":757,"context_line":"            value \u003d self._boolean_states.get(v.lower())"},{"line_number":758,"context_line":"            if value is None:"},{"line_number":759,"context_line":"                raise ValueError(\u0027Unexpected boolean value %r\u0027 % v)"},{"line_number":760,"context_line":""},{"line_number":761,"context_line":"            return value"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FyIw%3D","line":758,"updated":"2013-04-23 15:28:04.000000000","message":"Hmm, ok - we use ValueError here. TBH, I think that\u0027s a mistake and we can fix it by adding an exception that inherits from both Error and ValueError","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"e8b20b72393a0b41423d6a2b2c2c716bfa9e931e","unresolved":false,"context_lines":[{"line_number":755,"context_line":"        \"\"\"Retrieve the opt value as a boolean from ConfigParser.\"\"\""},{"line_number":756,"context_line":"        def convert_bool(v):"},{"line_number":757,"context_line":"            value \u003d self._boolean_states.get(v.lower())"},{"line_number":758,"context_line":"            if value is None:"},{"line_number":759,"context_line":"                raise ValueError(\u0027Unexpected boolean value %r\u0027 % v)"},{"line_number":760,"context_line":""},{"line_number":761,"context_line":"            return value"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FT48%3D","line":758,"in_reply_to":"AAAAOn%2F%2FyIw%3D","updated":"2013-05-15 01:28:50.000000000","message":"please see comment above :)","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"37ddd98f5c64040663749b9c9b9a020cf0b60ce4","unresolved":false,"context_lines":[{"line_number":1591,"context_line":""},{"line_number":1592,"context_line":"        info \u003d self._get_opt_info(name, group)"},{"line_number":1593,"context_line":"        values \u003d self._do_get_internal(info, name, group)"},{"line_number":1594,"context_line":"        return info[\u0027opt\u0027]._check_valid_values(values)"},{"line_number":1595,"context_line":""},{"line_number":1596,"context_line":"    def _do_get_internal(self, info, name, group):"},{"line_number":1597,"context_line":"        \"\"\"Look up an option value."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FyJA%3D","line":1594,"updated":"2013-04-23 15:28:04.000000000","message":"If we have argparse enforce this for the CLI, we just need to use _check_valid_values() for the config files - i.e. we can do it in _get_from_config_parser()\n\nI don\u0027t think it makes sense to enforce this for Opt.default, set_default() or set_override()","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"e8b20b72393a0b41423d6a2b2c2c716bfa9e931e","unresolved":false,"context_lines":[{"line_number":1591,"context_line":""},{"line_number":1592,"context_line":"        info \u003d self._get_opt_info(name, group)"},{"line_number":1593,"context_line":"        values \u003d self._do_get_internal(info, name, group)"},{"line_number":1594,"context_line":"        return info[\u0027opt\u0027]._check_valid_values(values)"},{"line_number":1595,"context_line":""},{"line_number":1596,"context_line":"    def _do_get_internal(self, info, name, group):"},{"line_number":1597,"context_line":"        \"\"\"Look up an option value."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FT44%3D","line":1594,"in_reply_to":"AAAAOn%2F%2FyJA%3D","updated":"2013-05-15 01:28:50.000000000","message":"Done","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"39d59b05fd16982313d80fdf75fca29d4041b4f9","unresolved":false,"context_lines":[{"line_number":734,"context_line":"        \"\"\"Retrieve the value from ConfigParser and validate it.\"\"\""},{"line_number":735,"context_line":"        def _check_valid_values(value):"},{"line_number":736,"context_line":"            if (self.choices and"},{"line_number":737,"context_line":"                value not in self.choices):"},{"line_number":738,"context_line":"                message \u003d (\u0027Invalid value: %r (choose from %s)\u0027 %"},{"line_number":739,"context_line":"                           (value, \u0027, \u0027.join(map(repr, self.choices))))"},{"line_number":740,"context_line":"                raise ValueError(message)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2Fyho%3D","line":737,"updated":"2013-05-23 07:48:27.000000000","message":"This if statement seems it can fit in one line without the paremthesis. Is this for better readability?","commit_id":"b59c83de0340e6219dbb05a6e592a481637a3479"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"c108f7af5a67351f19386de445cce04126357000","unresolved":false,"context_lines":[{"line_number":734,"context_line":"        \"\"\"Retrieve the value from ConfigParser and validate it.\"\"\""},{"line_number":735,"context_line":"        def _check_valid_values(value):"},{"line_number":736,"context_line":"            if (self.choices and"},{"line_number":737,"context_line":"                value not in self.choices):"},{"line_number":738,"context_line":"                message \u003d (\u0027Invalid value: %r (choose from %s)\u0027 %"},{"line_number":739,"context_line":"                           (value, \u0027, \u0027.join(map(repr, self.choices))))"},{"line_number":740,"context_line":"                raise ValueError(message)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FxjM%3D","line":737,"in_reply_to":"AAAAPH%2F%2Fyho%3D","updated":"2013-05-23 11:01:07.000000000","message":"Done","commit_id":"b59c83de0340e6219dbb05a6e592a481637a3479"}],"tests/test_cfg.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"37ddd98f5c64040663749b9c9b9a020cf0b60ce4","unresolved":false,"context_lines":[{"line_number":2341,"context_line":"        self.assertEquals(self.conf.blaa.foo, \u0027bar\u0027)"},{"line_number":2342,"context_line":""},{"line_number":2343,"context_line":""},{"line_number":2344,"context_line":"class AllowedValuesTestCase(BaseTestCase):"},{"line_number":2345,"context_line":""},{"line_number":2346,"context_line":"    def test_choice_default(self):"},{"line_number":2347,"context_line":"        self.conf.register_cli_opt(StrOpt(\u0027protocol\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FyOo%3D","line":2344,"updated":"2013-04-23 15:28:04.000000000","message":"ChoicesTestCase","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"e8b20b72393a0b41423d6a2b2c2c716bfa9e931e","unresolved":false,"context_lines":[{"line_number":2341,"context_line":"        self.assertEquals(self.conf.blaa.foo, \u0027bar\u0027)"},{"line_number":2342,"context_line":""},{"line_number":2343,"context_line":""},{"line_number":2344,"context_line":"class AllowedValuesTestCase(BaseTestCase):"},{"line_number":2345,"context_line":""},{"line_number":2346,"context_line":"    def test_choice_default(self):"},{"line_number":2347,"context_line":"        self.conf.register_cli_opt(StrOpt(\u0027protocol\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FT40%3D","line":2344,"in_reply_to":"AAAAOn%2F%2FyOo%3D","updated":"2013-05-15 01:28:50.000000000","message":"Done","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"37ddd98f5c64040663749b9c9b9a020cf0b60ce4","unresolved":false,"context_lines":[{"line_number":2347,"context_line":"        self.conf.register_cli_opt(StrOpt(\u0027protocol\u0027,"},{"line_number":2348,"context_line":"                                   default\u003d\u0027http\u0027,"},{"line_number":2349,"context_line":"                                   choices\u003d[\u0027http\u0027, \u0027https\u0027, \u0027ftp\u0027],"},{"line_number":2350,"context_line":"                                   required\u003dTrue))"},{"line_number":2351,"context_line":"        self.conf([])"},{"line_number":2352,"context_line":"        self.assertEquals(self.conf.protocol, \u0027http\u0027)"},{"line_number":2353,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FyOk%3D","line":2350,"updated":"2013-04-23 15:28:04.000000000","message":"required\u003dTrue doesn\u0027t seem to be relevant to the test case","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"e8b20b72393a0b41423d6a2b2c2c716bfa9e931e","unresolved":false,"context_lines":[{"line_number":2347,"context_line":"        self.conf.register_cli_opt(StrOpt(\u0027protocol\u0027,"},{"line_number":2348,"context_line":"                                   default\u003d\u0027http\u0027,"},{"line_number":2349,"context_line":"                                   choices\u003d[\u0027http\u0027, \u0027https\u0027, \u0027ftp\u0027],"},{"line_number":2350,"context_line":"                                   required\u003dTrue))"},{"line_number":2351,"context_line":"        self.conf([])"},{"line_number":2352,"context_line":"        self.assertEquals(self.conf.protocol, \u0027http\u0027)"},{"line_number":2353,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FT4o%3D","line":2350,"in_reply_to":"AAAAOn%2F%2FyOk%3D","updated":"2013-05-15 01:28:50.000000000","message":"Done","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"37ddd98f5c64040663749b9c9b9a020cf0b60ce4","unresolved":false,"context_lines":[{"line_number":2362,"context_line":"        self.conf.register_cli_opt(StrOpt(\u0027foo\u0027,"},{"line_number":2363,"context_line":"                                   choices\u003d[\u0027bar1\u0027, \u0027bar2\u0027],"},{"line_number":2364,"context_line":"                                   required\u003dTrue))"},{"line_number":2365,"context_line":"        self.assertRaises(ValueError, self.conf, [\u0027--foo\u0027, \u0027bar3\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FyOQ%3D","line":2365,"updated":"2013-04-23 15:28:04.000000000","message":"Can we get some config file tests too?","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"e8b20b72393a0b41423d6a2b2c2c716bfa9e931e","unresolved":false,"context_lines":[{"line_number":2362,"context_line":"        self.conf.register_cli_opt(StrOpt(\u0027foo\u0027,"},{"line_number":2363,"context_line":"                                   choices\u003d[\u0027bar1\u0027, \u0027bar2\u0027],"},{"line_number":2364,"context_line":"                                   required\u003dTrue))"},{"line_number":2365,"context_line":"        self.assertRaises(ValueError, self.conf, [\u0027--foo\u0027, \u0027bar3\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FT4w%3D","line":2365,"in_reply_to":"AAAAOn%2F%2FyOQ%3D","updated":"2013-05-15 01:28:50.000000000","message":"Done","commit_id":"f136abac2ed74d5ec4083b0d7b167d344643218d"}]}
