)]}'
{"mistral/auth/keycloak.py":[{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"d9d052cc1a696867873ba273e198fa41002facaa","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        access_token \u003d req.headers.get(\u0027X-Auth-Token\u0027)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        try:"},{"line_number":42,"context_line":"            decoded \u003d jwt.decode(access_token, algorithms\u003d[\u0027RS256\u0027],"},{"line_number":43,"context_line":"                                 verify\u003dFalse)"},{"line_number":44,"context_line":"        except Exception:"},{"line_number":45,"context_line":"            msg \u003d _(\"Token can\u0027t be decoded because of wrong format.\")"},{"line_number":46,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_040c12eb","line":43,"range":{"start_line":42,"start_character":0,"end_line":43,"end_character":46},"updated":"2017-07-17 13:44:49.000000000","message":"There is a code convention in mistral on how a call for a function should look like. If a function call takes more than one line, each argument should be in a new line and the closing brackets should be in a new line as well (see example in lines 45-49 in base file).\nThis function call should look like so:\n\n            decoded \u003d jwt.decode(\n                access_token,\n                algorithms\u003d[\u0027RS256\u0027],\n                verify\u003dFalse\n            )","commit_id":"02b41f297f5c96bcf85da840357da3810f5a0d89"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"ab7f4661540f4a1c322ffc023d682519e38921c0","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        access_token \u003d req.headers.get(\u0027X-Auth-Token\u0027)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        try:"},{"line_number":42,"context_line":"            decoded \u003d jwt.decode(access_token, algorithms\u003d[\u0027RS256\u0027],"},{"line_number":43,"context_line":"                                 verify\u003dFalse)"},{"line_number":44,"context_line":"        except Exception:"},{"line_number":45,"context_line":"            msg \u003d _(\"Token can\u0027t be decoded because of wrong format.\")"},{"line_number":46,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_bf1e6eb8","line":43,"range":{"start_line":42,"start_character":0,"end_line":43,"end_character":46},"in_reply_to":"1f1a1f67_040c12eb","updated":"2017-07-18 04:46:55.000000000","message":"Yes, we usually do this. However, I don\u0027t force people to follow this anymore until we have coding guidelines publicly available :)","commit_id":"02b41f297f5c96bcf85da840357da3810f5a0d89"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"da5cf2c7fb64ef9449db5155e342f8a0dd38f4eb","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        access_token \u003d req.headers.get(\u0027X-Auth-Token\u0027)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        try:"},{"line_number":42,"context_line":"            decoded \u003d jwt.decode(access_token, algorithms\u003d[\u0027RS256\u0027],"},{"line_number":43,"context_line":"                                 verify\u003dFalse)"},{"line_number":44,"context_line":"        except Exception:"},{"line_number":45,"context_line":"            msg \u003d _(\"Token can\u0027t be decoded because of wrong format.\")"},{"line_number":46,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_87285134","line":43,"range":{"start_line":42,"start_character":0,"end_line":43,"end_character":46},"in_reply_to":"1f1a1f67_bf1e6eb8","updated":"2017-07-25 07:52:52.000000000","message":"Thanks! Also, guidelines are not enough - we should have an automated linting check - otherwise we will be inconsistent, it is easy to miss.","commit_id":"02b41f297f5c96bcf85da840357da3810f5a0d89"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"9da376a920b61a37dc9ea218fe64cf545a87fc6f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        __, __, realm_name \u003d decoded[\u0027iss\u0027].strip().rpartition(\u0027/realms/\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Get roles from from parsed token"},{"line_number":54,"context_line":"        roles \u003d \u0027,\u0027.join(decoded[\u0027realm_access\u0027][\u0027roles\u0027]) \\"},{"line_number":55,"context_line":"            if \u0027realm_access\u0027 in decoded else \u0027\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        # NOTE(rakhmerov): There\u0027s a special endpoint for introspecting"},{"line_number":58,"context_line":"        # access tokens described in OpenID Connect specification but it\u0027s"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_a6aa4f82","line":55,"range":{"start_line":54,"start_character":16,"end_line":55,"end_character":48},"updated":"2017-07-11 04:21:47.000000000","message":"As far as I remember, backslashes are not recommended by openstack guidelines. Maybe it\u0027s outdated info though..","commit_id":"02b41f297f5c96bcf85da840357da3810f5a0d89"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"ab7f4661540f4a1c322ffc023d682519e38921c0","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        __, __, realm_name \u003d decoded[\u0027iss\u0027].strip().rpartition(\u0027/realms/\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Get roles from from parsed token"},{"line_number":54,"context_line":"        roles \u003d \u0027,\u0027.join(decoded[\u0027realm_access\u0027][\u0027roles\u0027]) \\"},{"line_number":55,"context_line":"            if \u0027realm_access\u0027 in decoded else \u0027\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        # NOTE(rakhmerov): There\u0027s a special endpoint for introspecting"},{"line_number":58,"context_line":"        # access tokens described in OpenID Connect specification but it\u0027s"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_df3c8a30","line":55,"range":{"start_line":54,"start_character":16,"end_line":55,"end_character":48},"in_reply_to":"1f1a1f67_24d5ce1c","updated":"2017-07-18 04:46:55.000000000","message":"Yes, or copy decoded[\u0027realm_access\u0027][\u0027roles\u0027] into a separate var.","commit_id":"02b41f297f5c96bcf85da840357da3810f5a0d89"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"d9d052cc1a696867873ba273e198fa41002facaa","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        __, __, realm_name \u003d decoded[\u0027iss\u0027].strip().rpartition(\u0027/realms/\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Get roles from from parsed token"},{"line_number":54,"context_line":"        roles \u003d \u0027,\u0027.join(decoded[\u0027realm_access\u0027][\u0027roles\u0027]) \\"},{"line_number":55,"context_line":"            if \u0027realm_access\u0027 in decoded else \u0027\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        # NOTE(rakhmerov): There\u0027s a special endpoint for introspecting"},{"line_number":58,"context_line":"        # access tokens described in OpenID Connect specification but it\u0027s"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_24d5ce1c","line":55,"range":{"start_line":54,"start_character":16,"end_line":55,"end_character":48},"in_reply_to":"3f1d235d_a6aa4f82","updated":"2017-07-17 13:44:49.000000000","message":"suggestion - maybe change to code to look something like so:\n        roles \u003d \u0027,\u0027.join(\n            decoded[\u0027realm_access\u0027][\u0027roles\u0027]\n        ) if \u0027realm_access\u0027 in decoded else \u0027\u0027","commit_id":"02b41f297f5c96bcf85da840357da3810f5a0d89"}]}
