)]}'
{"openstack_dashboard/dashboards/project/images/urls.py":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"45dcae2771dbbcc398e999688424b276261e3eba","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"if settings.ANGULAR_FEATURES[\u0027images_panel\u0027]:"},{"line_number":31,"context_line":"    # New angular images"},{"line_number":32,"context_line":"    urlpatterns \u003d ["},{"line_number":33,"context_line":"        url(r\u0027^$\u0027, AngularIndexView.as_view(), name\u003d\u0027index\u0027),"},{"line_number":34,"context_line":"    ]"},{"line_number":35,"context_line":"else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_8a5a1b4f","line":32,"updated":"2016-12-13 19:20:15.000000000","message":"We are defining a variable inside of a conditional statement, the scope looks strange. Just because you can do it does not mean you should (same story in javascript, but it is consider a bad practice). In this case, I actually would prefer to see them explicitly written out, but I\u0027ll defer to others. If that is not possible, then set urlpatterns to a default value, then do the conditional check.","commit_id":"2443e32949a1486545753476c85e354e6e814947"},{"author":{"_account_id":17172,"name":"Kenji Ishii","email":"ken-ishii@sx.jp.nec.com","username":"kenji-ishii"},"change_message_id":"e1f13bd39e9101d1d6463cf41dc2e50f4fd331dc","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from openstack_dashboard.dashboards.project.images import views"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"urlpatterns \u003d ["},{"line_number":32,"context_line":"    url(r\u0027\u0027, include(image_urls, namespace\u003d\u0027images\u0027)),"},{"line_number":33,"context_line":"    url(r\u0027\u0027, include(snapshot_urls, namespace\u003d\u0027snapshots\u0027)),"},{"line_number":34,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_071006a8","line":31,"updated":"2016-12-18 05:37:40.000000000","message":"One suggestion, currently the order of url pattern is changed but actually we should not change its order :)","commit_id":"b08d8a0d0348fc363b79175d76335485edd4881b"},{"author":{"_account_id":5623,"name":"David Lyle","email":"dklyle0@gmail.com","username":"david-lyle"},"change_message_id":"3ec61e797b5c5b0db1371bb9593bf807ffeae157","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from openstack_dashboard.dashboards.project.images import views"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"urlpatterns \u003d ["},{"line_number":32,"context_line":"    url(r\u0027\u0027, include(image_urls, namespace\u003d\u0027images\u0027)),"},{"line_number":33,"context_line":"    url(r\u0027\u0027, include(snapshot_urls, namespace\u003d\u0027snapshots\u0027)),"},{"line_number":34,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_51d3d95f","line":31,"in_reply_to":"1a6eadb0_071006a8","updated":"2017-01-06 17:58:11.000000000","message":"Why? This approach is actually cleaner, plus to preserve order just use\n\nurlpatterns.insert(0, url(r\u0027^$\u0027, ...))","commit_id":"b08d8a0d0348fc363b79175d76335485edd4881b"}]}
