)]}'
{"tests/ci/osresources.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"4f462eab9915159479ea8cc27e0cb5a77b2026c0","unresolved":false,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        # NOTE(amaretskiy): Some resources are expected to be remaining, so"},{"line_number":294,"context_line":"        #   we filter these expected changes and save them in \u0027filtered_added\u0027"},{"line_number":295,"context_line":"        added \u003d []"},{"line_number":296,"context_line":"        filtered_added \u003d []"},{"line_number":297,"context_line":"        patterns_added \u003d [re.compile(pat) for pat in ("},{"line_number":298,"context_line":"            \"^keystone role id:[\\w\\-]+ name:_member_$\","}],"source_content_type":"text/x-python","patch_set":1,"id":"fa69d971_03fdc039","line":295,"updated":"2016-01-08 15:12:33.000000000","message":"I find it confusing to have added and added_ variables, but I can\u0027t think of a better name for either of them. Maybe change added_ to raw_added?","commit_id":"a4f8a22d7463fefc7e062cbcc3efc9a6c3baddca"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"4f462eab9915159479ea8cc27e0cb5a77b2026c0","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        filtered_added \u003d []"},{"line_number":297,"context_line":"        patterns_added \u003d [re.compile(pat) for pat in ("},{"line_number":298,"context_line":"            \"^keystone role id:[\\w\\-]+ name:_member_$\","},{"line_number":299,"context_line":"            \"^(neutron|nova) security_group id:\\S+ name:default tenant_id:.+\")]"},{"line_number":300,"context_line":"        for resource_name in added_:"},{"line_number":301,"context_line":"            matched \u003d False"},{"line_number":302,"context_line":"            for pattern in patterns_added:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa69d971_a3d4f4bc","line":299,"updated":"2016-01-08 15:12:33.000000000","message":"This should be made into a single regex so it doesn\u0027t have to be checked in a loop:\n\n    added_filter \u003d re.compile(r\"^keystone role id:[\\w\\-]+ name:_member_$|^(?:neutron|nova) security_group id:\\S+ name:default tenant_id:.+\")\n\nIt should also be a raw string because of the backslash escaping, and adding a ?: in the neutron|nova group will slightly improve performance.","commit_id":"a4f8a22d7463fefc7e062cbcc3efc9a6c3baddca"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"6470d776f43721b0c45728bbf93a678cc14a247e","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        filtered_added \u003d []"},{"line_number":297,"context_line":"        patterns_added \u003d [re.compile(pat) for pat in ("},{"line_number":298,"context_line":"            \"^keystone role id:[\\w\\-]+ name:_member_$\","},{"line_number":299,"context_line":"            \"^(neutron|nova) security_group id:\\S+ name:default tenant_id:.+\")]"},{"line_number":300,"context_line":"        for resource_name in added_:"},{"line_number":301,"context_line":"            matched \u003d False"},{"line_number":302,"context_line":"            for pattern in patterns_added:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa69d971_ff8b5c66","line":299,"in_reply_to":"fa69d971_6b86d2dc","updated":"2016-01-08 16:44:45.000000000","message":"We can still add more patterns to a single regex.\n\nBut if you want to optimize for making that easy, I\u0027d suggest a) making it more clearly configurable (e.g., in a module-level variable); and b) use any() below:\n\n    for resource_name in added_:\n        if any(p.match(resource_name) for p in patterns_added):\n            filtered_added.append(resource_name)\n        else:\n            added.append(resource_name)","commit_id":"a4f8a22d7463fefc7e062cbcc3efc9a6c3baddca"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"802ca2178d6fe868cf44e105098a433c3c3f2be2","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        filtered_added \u003d []"},{"line_number":297,"context_line":"        patterns_added \u003d [re.compile(pat) for pat in ("},{"line_number":298,"context_line":"            \"^keystone role id:[\\w\\-]+ name:_member_$\","},{"line_number":299,"context_line":"            \"^(neutron|nova) security_group id:\\S+ name:default tenant_id:.+\")]"},{"line_number":300,"context_line":"        for resource_name in added_:"},{"line_number":301,"context_line":"            matched \u003d False"},{"line_number":302,"context_line":"            for pattern in patterns_added:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa69d971_6b86d2dc","line":299,"in_reply_to":"fa69d971_a3d4f4bc","updated":"2016-01-08 16:05:59.000000000","message":"We could add more patterns in future, so single regex will not solve the problem","commit_id":"a4f8a22d7463fefc7e062cbcc3efc9a6c3baddca"}]}
