)]}'
{"keystone/backends/sqlalchemy/api/role.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4a1b8145568891d9a3e7a94ab3b37984d85adc10","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            session \u003d get_session()"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        if marker:"},{"line_number":80,"context_line":"            return session.query(models.Role).filter(\"id\u003e:marker\").params(\\"},{"line_number":81,"context_line":"                    marker\u003d\u0027%s\u0027 % marker).filter_by(\\"},{"line_number":82,"context_line":"                    service_id\u003dservice_id).order_by(\\"},{"line_number":83,"context_line":"                    models.Role.id.desc()).limit(limit).all()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAC3%2F%2F7CE%3D","line":80,"updated":"2011-12-22 17:25:25.000000000","message":"Backslashes to continue lines are not needed (and shouldn\u0027t be used) if the line break is contained within parentheses/brackets. This comment applies to multiple places in this script, both existing and newly added.","commit_id":"f80236dce0b7dfb86710daa823cff4cc24907edc"},{"author":{"_account_id":8,"name":"Yogeshwar Srikrishnan","email":"yoga80@yahoo.com","username":"yogesh-srikrishnan"},"change_message_id":"bcc041681dd664ce2a4b07d33f11c95efee915a7","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            session \u003d get_session()"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        if marker:"},{"line_number":80,"context_line":"            return session.query(models.Role).filter(\"id\u003e:marker\").params(\\"},{"line_number":81,"context_line":"                    marker\u003d\u0027%s\u0027 % marker).filter_by(\\"},{"line_number":82,"context_line":"                    service_id\u003dservice_id).order_by(\\"},{"line_number":83,"context_line":"                    models.Role.id.desc()).limit(limit).all()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAC3%2F%2F660%3D","line":80,"in_reply_to":"AAAAC3%2F%2F7CE%3D","updated":"2011-12-22 21:15:48.000000000","message":"changed all over this script.","commit_id":"f80236dce0b7dfb86710daa823cff4cc24907edc"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4a1b8145568891d9a3e7a94ab3b37984d85adc10","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    # pylint: disable\u003dR0912"},{"line_number":90,"context_line":"    def get_by_service_get_page_markers(self,"},{"line_number":91,"context_line":"        service_id, marker, limit, session\u003dNone):"},{"line_number":92,"context_line":"        if not session:"},{"line_number":93,"context_line":"            session \u003d get_session()"},{"line_number":94,"context_line":"        first \u003d session.query(models.Role).filter_by(\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAC3%2F%2F7CI%3D","line":91,"updated":"2011-12-22 17:25:25.000000000","message":"The continuation line should not be indented to the same level as the contained block. Typically you should indent two levels (8 spaces) for continuation lines.","commit_id":"f80236dce0b7dfb86710daa823cff4cc24907edc"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4a1b8145568891d9a3e7a94ab3b37984d85adc10","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                        marker\u003d\u0027%s\u0027 % marker).filter_by(\\"},{"line_number":110,"context_line":"                        service_id\u003dservice_id).order_by(\\"},{"line_number":111,"context_line":"                        models.Role.id.desc()).limit(int(limit)).all()"},{"line_number":112,"context_line":"        if len(next_page) \u003d\u003d 0:"},{"line_number":113,"context_line":"            next_page \u003d last"},{"line_number":114,"context_line":"        else:"},{"line_number":115,"context_line":"            for t in next_page:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAC3%2F%2F7CA%3D","line":112,"updated":"2011-12-22 17:25:25.000000000","message":"Don\u0027t compare a len() to zero. Instead, use the more common:\n\nif not next_page:","commit_id":"f80236dce0b7dfb86710daa823cff4cc24907edc"},{"author":{"_account_id":8,"name":"Yogeshwar Srikrishnan","email":"yoga80@yahoo.com","username":"yogesh-srikrishnan"},"change_message_id":"bcc041681dd664ce2a4b07d33f11c95efee915a7","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                        marker\u003d\u0027%s\u0027 % marker).filter_by(\\"},{"line_number":110,"context_line":"                        service_id\u003dservice_id).order_by(\\"},{"line_number":111,"context_line":"                        models.Role.id.desc()).limit(int(limit)).all()"},{"line_number":112,"context_line":"        if len(next_page) \u003d\u003d 0:"},{"line_number":113,"context_line":"            next_page \u003d last"},{"line_number":114,"context_line":"        else:"},{"line_number":115,"context_line":"            for t in next_page:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAC3%2F%2F66s%3D","line":112,"in_reply_to":"AAAAC3%2F%2F7CA%3D","updated":"2011-12-22 21:15:48.000000000","message":"changed all over.","commit_id":"f80236dce0b7dfb86710daa823cff4cc24907edc"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"6c2310003bd0451de910a046497e4296f99d48cc","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            next_page \u003d last"},{"line_number":114,"context_line":"        else:"},{"line_number":115,"context_line":"            for t in next_page:"},{"line_number":116,"context_line":"                next_page \u003d t"},{"line_number":117,"context_line":"        if not prev_page:"},{"line_number":118,"context_line":"            prev_page \u003d first"},{"line_number":119,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAC3%2F%2F60g%3D","line":116,"updated":"2011-12-23 15:50:55.000000000","message":"Can you explain what this loop is doing? If you just want the last item in the list, just do:\n\nnext_page \u003d next_page[-1]\n\n(same comment applies to prev_page loop on lines 120-1, and those in lines 242-251 and 300-309)","commit_id":"8defc6d0ff56f05add4e9bea5ecc252063d5e474"}],"keystone/controllers/roles.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4a1b8145568891d9a3e7a94ab3b37984d85adc10","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        return utils.send_result(200, req, tenant)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __get_all_roles(self, req):"},{"line_number":42,"context_line":"        service_id \u003d req.GET[\"serviceId\"] if \"serviceId\" in req.GET else None"},{"line_number":43,"context_line":"        marker, limit, url \u003d get_marker_limit_and_url(req)"},{"line_number":44,"context_line":"        if service_id:"},{"line_number":45,"context_line":"            roles \u003d self.identity_service.get_roles_by_service("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAC3%2F%2F7B8%3D","line":42,"updated":"2011-12-22 17:25:25.000000000","message":"Could be written more simply as:\n\nservice_id \u003d req.GET.get(\"serviceId\")","commit_id":"f80236dce0b7dfb86710daa823cff4cc24907edc"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"caa295a990261bff05a630ece809f570fac8910b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        return utils.send_result(200, req, tenant)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __get_all_roles(self, req):"},{"line_number":42,"context_line":"        service_id \u003d req.GET[\"serviceId\"] if \"serviceId\" in req.GET else None"},{"line_number":43,"context_line":"        marker, limit, url \u003d get_marker_limit_and_url(req)"},{"line_number":44,"context_line":"        if service_id:"},{"line_number":45,"context_line":"            roles \u003d self.identity_service.get_roles_by_service("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAC3%2F%2F64g%3D","line":42,"in_reply_to":"AAAAC3%2F%2F64o%3D","updated":"2011-12-22 23:17:36.000000000","message":"OK, thanks.","commit_id":"f80236dce0b7dfb86710daa823cff4cc24907edc"},{"author":{"_account_id":8,"name":"Yogeshwar Srikrishnan","email":"yoga80@yahoo.com","username":"yogesh-srikrishnan"},"change_message_id":"67101ca224989021a313ace02ad3ad5cc931d107","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        return utils.send_result(200, req, tenant)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __get_all_roles(self, req):"},{"line_number":42,"context_line":"        service_id \u003d req.GET[\"serviceId\"] if \"serviceId\" in req.GET else None"},{"line_number":43,"context_line":"        marker, limit, url \u003d get_marker_limit_and_url(req)"},{"line_number":44,"context_line":"        if service_id:"},{"line_number":45,"context_line":"            roles \u003d self.identity_service.get_roles_by_service("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAC3%2F%2F64o%3D","line":42,"in_reply_to":"AAAAC3%2F%2F66I%3D","updated":"2011-12-22 23:15:04.000000000","message":"I dont think its a dictionary.It is of tyepe webob.request.Request.I checked and if value is not present it indeed throws error.","commit_id":"f80236dce0b7dfb86710daa823cff4cc24907edc"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"8fffc3b75be0b90c854f56d79f601e7dd272b178","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        return utils.send_result(200, req, tenant)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __get_all_roles(self, req):"},{"line_number":42,"context_line":"        service_id \u003d req.GET[\"serviceId\"] if \"serviceId\" in req.GET else None"},{"line_number":43,"context_line":"        marker, limit, url \u003d get_marker_limit_and_url(req)"},{"line_number":44,"context_line":"        if service_id:"},{"line_number":45,"context_line":"            roles \u003d self.identity_service.get_roles_by_service("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAC3%2F%2F66I%3D","line":42,"in_reply_to":"AAAAC3%2F%2F67E%3D","updated":"2011-12-22 21:21:38.000000000","message":"Isn\u0027t req.GET a dict? If so, the dict\u0027s get() method should return None if the key isn\u0027t present, not raise an exception.","commit_id":"f80236dce0b7dfb86710daa823cff4cc24907edc"},{"author":{"_account_id":8,"name":"Yogeshwar Srikrishnan","email":"yoga80@yahoo.com","username":"yogesh-srikrishnan"},"change_message_id":"bcc041681dd664ce2a4b07d33f11c95efee915a7","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        return utils.send_result(200, req, tenant)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __get_all_roles(self, req):"},{"line_number":42,"context_line":"        service_id \u003d req.GET[\"serviceId\"] if \"serviceId\" in req.GET else None"},{"line_number":43,"context_line":"        marker, limit, url \u003d get_marker_limit_and_url(req)"},{"line_number":44,"context_line":"        if service_id:"},{"line_number":45,"context_line":"            roles \u003d self.identity_service.get_roles_by_service("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAC3%2F%2F67E%3D","line":42,"in_reply_to":"AAAAC3%2F%2F7B8%3D","updated":"2011-12-22 21:15:48.000000000","message":"if the check is not there we get a exceptions.KeyError.Check is needed","commit_id":"f80236dce0b7dfb86710daa823cff4cc24907edc"}],"keystone/logic/service.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4a1b8145568891d9a3e7a94ab3b37984d85adc10","unresolved":false,"context_lines":[{"line_number":862,"context_line":"    def transform_roles(self, droles):"},{"line_number":863,"context_line":"        ts \u003d []"},{"line_number":864,"context_line":"        for drole in droles:"},{"line_number":865,"context_line":"            ts.append(Role(drole.id, drole.name, drole.desc, drole.service_id))"},{"line_number":866,"context_line":"        return ts"},{"line_number":867,"context_line":""},{"line_number":868,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAC3%2F%2F7B0%3D","line":865,"updated":"2011-12-22 17:25:25.000000000","message":"Could be more efficient with:\n\ndef transform_roles(self, droles):\n    return [(Role(drole.id, drole.name, drole.desc, drole.service_id)\n            for drole in droles]","commit_id":"f80236dce0b7dfb86710daa823cff4cc24907edc"},{"author":{"_account_id":8,"name":"Yogeshwar Srikrishnan","email":"yoga80@yahoo.com","username":"yogesh-srikrishnan"},"change_message_id":"bcc041681dd664ce2a4b07d33f11c95efee915a7","unresolved":false,"context_lines":[{"line_number":862,"context_line":"    def transform_roles(self, droles):"},{"line_number":863,"context_line":"        ts \u003d []"},{"line_number":864,"context_line":"        for drole in droles:"},{"line_number":865,"context_line":"            ts.append(Role(drole.id, drole.name, drole.desc, drole.service_id))"},{"line_number":866,"context_line":"        return ts"},{"line_number":867,"context_line":""},{"line_number":868,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAC3%2F%2F664%3D","line":865,"in_reply_to":"AAAAC3%2F%2F7B0%3D","updated":"2011-12-22 21:15:48.000000000","message":"agreed.","commit_id":"f80236dce0b7dfb86710daa823cff4cc24907edc"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"6c2310003bd0451de910a046497e4296f99d48cc","unresolved":false,"context_lines":[{"line_number":863,"context_line":"        ts \u003d []"},{"line_number":864,"context_line":"        for drole in droles:"},{"line_number":865,"context_line":"            ts.append(Role(drole.id, drole.name, drole.desc, drole.service_id))"},{"line_number":866,"context_line":"        return ts"},{"line_number":867,"context_line":"        return [Role(drole.id, drole.name, drole.desc, drole.service_id)"},{"line_number":868,"context_line":"                for drole in droles]"},{"line_number":869,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAC3%2F%2F60Y%3D","line":866,"updated":"2011-12-23 15:50:55.000000000","message":"Lines 863-6 should be deleted.","commit_id":"8defc6d0ff56f05add4e9bea5ecc252063d5e474"}],"keystone/test/functional/common.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"6c2310003bd0451de910a046497e4296f99d48cc","unresolved":false,"context_lines":[{"line_number":883,"context_line":"        if service_id is None:"},{"line_number":884,"context_line":"            return self.get_roles(**kwargs)"},{"line_number":885,"context_line":"        else:"},{"line_number":886,"context_line":"            return self.get_roles_by_service(service_id)"},{"line_number":887,"context_line":""},{"line_number":888,"context_line":"    def fetch_role(self, role_id\u003dNone, **kwargs):"},{"line_number":889,"context_line":"        role_id \u003d optional_str(role_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAC3%2F%2F60U%3D","line":886,"updated":"2011-12-23 15:50:55.000000000","message":"Shouldn\u0027t the **kwargs also be passed here?","commit_id":"8defc6d0ff56f05add4e9bea5ecc252063d5e474"}]}
