)]}'
{"examples/common.py":[{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"317a75fd9405b542879a2f3cf46402b684aee2ad","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    def set_option(cls, var, values):"},{"line_number":114,"context_line":"        if var \u003d\u003d \"OS_REGION_NAME\":"},{"line_number":115,"context_line":"            var \u003d \"region\""},{"line_number":116,"context_line":"        var \u003d var.strip(\"--os-api-\")"},{"line_number":117,"context_line":"        var \u003d var.strip(\"OS_API_\")"},{"line_number":118,"context_line":"        var \u003d var.lower()"},{"line_number":119,"context_line":"        for kvp in values.split(\",\"):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_9e6f73c3","line":116,"updated":"2014-09-16 16:34:30.000000000","message":"This is one place I wouldn\u0027t mind a one-liner to combine the two strip calls and cap it off with a lower. Very, very soft suggestion, though.","commit_id":"4c00ebc10c0590566f546745c18c597a6cbf25a6"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"f468471684b990ce0c34d66b91ea50cc9544bdd6","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    @classmethod"},{"line_number":113,"context_line":"    def set_option(cls, var, values):"},{"line_number":114,"context_line":"        if var \u003d\u003d \"OS_REGION_NAME\":"},{"line_number":115,"context_line":"            var \u003d \"region\""},{"line_number":116,"context_line":"        var \u003d var.strip(\"--os-api-\")"},{"line_number":117,"context_line":"        var \u003d var.strip(\"OS_API_\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_5a421b11","line":114,"updated":"2014-10-01 17:36:46.000000000","message":"you should follow the pattern in the code, it\u0027s using single quotes instead of double quotes. For example:\n\nif var \u003d\u003d \u0027OS_REGION_NAME\u0027:","commit_id":"9507bef03b0a0730278ba8f050824182cde70a2d"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"9e623f2e7c54d565040faf62c1a640d662b57080","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    def set_option(cls, var, values):"},{"line_number":114,"context_line":"        if var \u003d\u003d \"OS_REGION_NAME\":"},{"line_number":115,"context_line":"            var \u003d \"region\""},{"line_number":116,"context_line":"        var \u003d var.strip(\"--os-api-\")"},{"line_number":117,"context_line":"        var \u003d var.strip(\"OS_API_\")"},{"line_number":118,"context_line":"        var \u003d var.lower()"},{"line_number":119,"context_line":"        for kvp in values.split(\",\"):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9df570_f1d4bf48","line":116,"updated":"2014-09-24 15:23:43.000000000","message":"This isn\u0027t doing what I think you want. The argument to strip is treated as a set of characters to remove. Their order doesn\u0027t matter.\n\n  \u003e\u003e\u003e \u0027--not-os-api\u0027.strip(\u0027--os-api\u0027)\n  \u0027not\u0027\n  \u003e\u003e\u003e \u0027--not-os-api\u0027.strip(\u0027-os\u0027)\n  \u0027not-os-api\u0027\n  \u003e\u003e\u003e \u0027--not-os-api\u0027.strip(\u0027-notsapi\u0027)\n  \u0027\u0027","commit_id":"9507bef03b0a0730278ba8f050824182cde70a2d"},{"author":{"_account_id":13140,"name":"Victor Silva","email":"victor@lsd.ufcg.edu.br","username":"victsou"},"change_message_id":"433516df8770031e862d2b1f2410b45a720f097c","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        var \u003d var.lower()"},{"line_number":119,"context_line":"        for kvp in values.split(\",\"):"},{"line_number":120,"context_line":"            if var \u003d\u003d \"region\":"},{"line_number":121,"context_line":"                if kvp.find(\"\u003d\") !\u003d -1:"},{"line_number":122,"context_line":"                    service, value \u003d kvp.split(\"\u003d\")"},{"line_number":123,"context_line":"                else:"},{"line_number":124,"context_line":"                    service \u003d cls.pref.ALL"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_a81d9a68","line":121,"updated":"2014-09-30 20:57:49.000000000","message":"Couldn\u0027t you use \u0027in\u0027?\n\n if \u0027\u003d\u0027 in kvp:\n     service, value \u003d kvp.split(\u0027\u003d\u0027)","commit_id":"9507bef03b0a0730278ba8f050824182cde70a2d"}],"openstack/auth/service_filter.py":[{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"317a75fd9405b542879a2f3cf46402b684aee2ad","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    def match_visibility(self, visibility):"},{"line_number":80,"context_line":"        return self.visibility \u003d\u003d visibility"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def set_visibility(self, visibility):"},{"line_number":83,"context_line":"        if not visibility:"},{"line_number":84,"context_line":"            msg \u003d \"Visibility must be specified to locate service\""},{"line_number":85,"context_line":"            raise exceptions.SDKException(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_4fd3825f","line":82,"updated":"2014-09-16 16:34:30.000000000","message":"Would rather see this be a property than explicitly named setter.","commit_id":"4c00ebc10c0590566f546745c18c597a6cbf25a6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"9e623f2e7c54d565040faf62c1a640d662b57080","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        if not visibility:"},{"line_number":84,"context_line":"            msg \u003d \"Visibility must be specified to locate service\""},{"line_number":85,"context_line":"            raise exceptions.SDKException(msg)"},{"line_number":86,"context_line":"        visibility \u003d visibility.rstrip(\u0027URL\u0027)"},{"line_number":87,"context_line":"        visibility \u003d visibility.lower()"},{"line_number":88,"context_line":"        if visibility not in self.VISIBILITY:"},{"line_number":89,"context_line":"            msg \u003d \"Visibility \u003c%s\u003e not in %s\" % (visibility, self.VISIBILITY)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9df570_3103a774","line":86,"updated":"2014-09-24 15:23:43.000000000","message":"See earlier comment on strip().","commit_id":"9507bef03b0a0730278ba8f050824182cde70a2d"}],"openstack/session.py":[{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"633272d3c59378ad8c1a19e7dccd0aadea0821f0","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        \"\"\""},{"line_number":34,"context_line":"        self.transport \u003d transport"},{"line_number":35,"context_line":"        self.authenticator \u003d authenticator"},{"line_number":36,"context_line":"        self.preference \u003d preference"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def _request(self, path, method, service\u003dNone, authenticate\u003dTrue,"},{"line_number":39,"context_line":"                 **kwargs):"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_748d007c","line":36,"updated":"2014-10-14 21:33:45.000000000","message":"If preference is None, set a default self.preference \u003d user_preference.UserPreference()","commit_id":"c93d5fbdab942c78d1c9bb2bd993de8320554f0c"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"633272d3c59378ad8c1a19e7dccd0aadea0821f0","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            token \u003d self.authenticator.get_token(self.transport)"},{"line_number":59,"context_line":"            if token:"},{"line_number":60,"context_line":"                headers[\u0027X-Auth-Token\u0027] \u003d token"},{"line_number":61,"context_line":"        if service and self.preference:"},{"line_number":62,"context_line":"            preference \u003d self.preference.get_preference(service.service_type)"},{"line_number":63,"context_line":"            if preference:"},{"line_number":64,"context_line":"                service \u003d preference.join(service)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_d4ef8c1c","line":61,"updated":"2014-10-14 21:33:45.000000000","message":"We\u0027ll always have a self.preference","commit_id":"c93d5fbdab942c78d1c9bb2bd993de8320554f0c"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"11af5f1496c39839c54cae22c2729f0212ba0c54","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        self.transport \u003d transport"},{"line_number":36,"context_line":"        self.authenticator \u003d authenticator"},{"line_number":37,"context_line":"        self.preference \u003d preference or user_preference.UserPreference()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _request(self, path, method, service\u003dNone, authenticate\u003dTrue,"},{"line_number":40,"context_line":"                 **kwargs):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_b0283434","line":37,"updated":"2014-10-15 19:45:49.000000000","message":"While the result is the same, I think we shouldn\u0027t try to create the UserPreference unless we need to, which is in line with how similar moves are done elsewhere. It becomes more than a one-liner since the names are long, but we should probably do something more like\n\n    if preference is not None:\n        self.preference \u003d preference\n    else:\n        self.preference \u003d user_preference.UserPreference()","commit_id":"5d2b0e81604491426fdbfce9bf4ac43dbd446000"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"ce6effc5e93eaf0779217b28113d307ea712571d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        self.transport \u003d transport"},{"line_number":36,"context_line":"        self.authenticator \u003d authenticator"},{"line_number":37,"context_line":"        self.preference \u003d preference or user_preference.UserPreference()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _request(self, path, method, service\u003dNone, authenticate\u003dTrue,"},{"line_number":40,"context_line":"                 **kwargs):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_433741ff","line":37,"in_reply_to":"baa201ad_30dfe4d7","updated":"2014-10-15 23:07:20.000000000","message":"Ah, you\u0027re right, I forgot it short circuits when it can. I\u0027m not used to seeing object creation in the second position, which was the tip off.\n\n(I think that\u0027s now the second thing in today\u0027s reviews I\u0027ve been tipped off about but then haven\u0027t gone and fully thought about - I\u0027ll fix that)","commit_id":"5d2b0e81604491426fdbfce9bf4ac43dbd446000"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"e2e1439a0586d38a498346e5a72e04719d719c4a","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        self.transport \u003d transport"},{"line_number":36,"context_line":"        self.authenticator \u003d authenticator"},{"line_number":37,"context_line":"        self.preference \u003d preference or user_preference.UserPreference()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _request(self, path, method, service\u003dNone, authenticate\u003dTrue,"},{"line_number":40,"context_line":"                 **kwargs):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_30dfe4d7","line":37,"in_reply_to":"baa201ad_b0283434","updated":"2014-10-15 20:03:22.000000000","message":"I wasn\u0027t sure how it worked, so I added a print to the UserPreference constructor and tried it.  It looks like the or operator won\u0027t evaluate the second expression if the first is true:\n\n    \u003e\u003e\u003e from openstack import user_preference\n    \u003e\u003e\u003e pref \u003d None\n    \u003e\u003e\u003e pref \u003d pref or user_preference.UserPreference()\n    UserPreference init called\n    \u003e\u003e\u003e pref \u003d pref or user_preference.UserPreference()\n    \u003e\u003e\u003e","commit_id":"5d2b0e81604491426fdbfce9bf4ac43dbd446000"}],"openstack/user_preference.py":[{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"317a75fd9405b542879a2f3cf46402b684aee2ad","unresolved":false,"context_lines":[{"line_number":24,"context_line":"USER_AGENT \u003d \u0027OSPythonSDK\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class UserPreference(object):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    ALL \u003d \"*\""},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_282f148a","line":27,"updated":"2014-09-16 16:34:30.000000000","message":"The method names have me wondering if UserPreference should be singular, meaning all of the get/set methods should be properties that operate on one service. Then we have UserPreferences which is a collection of all of those service preferences, so you end up with UserPreferences().compute_service and on that you call the region property to get/set it.\n\nThat might turn some of the argparse stuff in common on its head, though.","commit_id":"4c00ebc10c0590566f546745c18c597a6cbf25a6"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"65f75c13936630168ef169a05340327f4a94c0f4","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class UserPreference(object):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    ALL \u003d \"*\""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_d464ecba","line":28,"updated":"2014-10-14 21:36:43.000000000","message":"Get get_services and tests from https://review.openstack.org/#/c/121368/2/openstack/user_preference.py","commit_id":"c93d5fbdab942c78d1c9bb2bd993de8320554f0c"}]}
