)]}'
{"nova/filters.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a37580ade44d1ea8360f13ff745e098720a48b36","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        _filter_one() to filter a single object."},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        for obj in filter_obj_list:"},{"line_number":45,"context_line":"            if self._filter_one(obj, filter_properties):"},{"line_number":46,"context_line":"                yield obj"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    # Set to true in a subclass if a filter only needs to be run once"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_6d571327","line":45,"updated":"2015-09-20 06:12:52.000000000","message":"This is generator....so this method won\u0027t execute before you iterate it.","commit_id":"62d5b9e61a10db71d8da24614f48825866441276"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a37580ade44d1ea8360f13ff745e098720a48b36","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                cls_name \u003d filter_.__class__.__name__"},{"line_number":87,"context_line":"                start_count \u003d len(list_objs)"},{"line_number":88,"context_line":"                watch.restart()"},{"line_number":89,"context_line":"                objs \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":90,"context_line":"                watch.stop()"},{"line_number":91,"context_line":"                if objs is None:"},{"line_number":92,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_8d54e721","line":89,"updated":"2015-09-20 06:12:52.000000000","message":"if you check the line 46, actually this method only return a generator, it didn\u0027t execute the filters yet.\n\nIt executes at line 96","commit_id":"62d5b9e61a10db71d8da24614f48825866441276"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"61342e4f2001a85904efb3d1fdc2afa823511d81","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                cls_name \u003d filter_.__class__.__name__"},{"line_number":87,"context_line":"                start_count \u003d len(list_objs)"},{"line_number":88,"context_line":"                watch.restart()"},{"line_number":89,"context_line":"                objs \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":90,"context_line":"                watch.stop()"},{"line_number":91,"context_line":"                if objs is None:"},{"line_number":92,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_68eccf8f","line":89,"in_reply_to":"ba15a1d1_8d54e721","updated":"2015-09-21 12:06:07.000000000","message":"++","commit_id":"62d5b9e61a10db71d8da24614f48825866441276"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"21140a4d1f080cbf860acf247d80ea9f3ea361c0","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                if objs is None:"},{"line_number":92,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\""},{"line_number":93,"context_line":"                              \" (it took %0.2f seconds to recommend this)\","},{"line_number":94,"context_line":"                              cls_name, watch.elapsed())"},{"line_number":95,"context_line":"                    return"},{"line_number":96,"context_line":"                list_objs \u003d list(objs)"},{"line_number":97,"context_line":"                end_count \u003d len(list_objs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_b8a32e00","line":94,"updated":"2015-09-19 09:14:03.000000000","message":"instead of two args these should be sent as a dict","commit_id":"62d5b9e61a10db71d8da24614f48825866441276"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"2412d6bd598a56691dc0fe7d67001baa84f3a171","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                if objs is None:"},{"line_number":92,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\""},{"line_number":93,"context_line":"                              \" (it took %0.2f seconds to recommend this)\","},{"line_number":94,"context_line":"                              cls_name, watch.elapsed())"},{"line_number":95,"context_line":"                    return"},{"line_number":96,"context_line":"                list_objs \u003d list(objs)"},{"line_number":97,"context_line":"                end_count \u003d len(list_objs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_25160756","line":94,"in_reply_to":"ba15a1d1_73d7f7ed","updated":"2015-09-21 08:18:34.000000000","message":"Right. Just realized it doesn\u0027t matter since this code is unreachable. Like Alex states, the call to filter_all returns a generator so the check at L91 never holds true. You could as well remove L91-95 because there is new code at L106-112 that replace what this once did (log and break out of the loop).","commit_id":"62d5b9e61a10db71d8da24614f48825866441276"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"facc6a278032ce5946783ea0d4d998f4f6c31cb3","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                if objs is None:"},{"line_number":92,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\""},{"line_number":93,"context_line":"                              \" (it took %0.2f seconds to recommend this)\","},{"line_number":94,"context_line":"                              cls_name, watch.elapsed())"},{"line_number":95,"context_line":"                    return"},{"line_number":96,"context_line":"                list_objs \u003d list(objs)"},{"line_number":97,"context_line":"                end_count \u003d len(list_objs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_73d7f7ed","line":94,"in_reply_to":"ba15a1d1_b8a32e00","updated":"2015-09-19 14:47:59.000000000","message":"this isn\u0027t being potentially translated so I\u0027m not so sure it matters in this case.","commit_id":"62d5b9e61a10db71d8da24614f48825866441276"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a37580ade44d1ea8360f13ff745e098720a48b36","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                              \" (it took %0.2f seconds to recommend this)\","},{"line_number":94,"context_line":"                              cls_name, watch.elapsed())"},{"line_number":95,"context_line":"                    return"},{"line_number":96,"context_line":"                list_objs \u003d list(objs)"},{"line_number":97,"context_line":"                end_count \u003d len(list_objs)"},{"line_number":98,"context_line":"                part_filter_results.append(log_msg % {\"cls_name\": cls_name,"},{"line_number":99,"context_line":"                        \"start\": start_count, \"end\": end_count,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_2d303b07","line":96,"updated":"2015-09-20 06:12:52.000000000","message":"execute at here.","commit_id":"62d5b9e61a10db71d8da24614f48825866441276"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"95f968e17b280aed4eed383862f6b186e64d2a3c","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                              \" (it took %0.2f seconds to recommend this)\","},{"line_number":94,"context_line":"                              cls_name, watch.elapsed())"},{"line_number":95,"context_line":"                    return"},{"line_number":96,"context_line":"                list_objs \u003d list(objs)"},{"line_number":97,"context_line":"                end_count \u003d len(list_objs)"},{"line_number":98,"context_line":"                part_filter_results.append(log_msg % {\"cls_name\": cls_name,"},{"line_number":99,"context_line":"                        \"start\": start_count, \"end\": end_count,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_762fa53e","line":96,"in_reply_to":"ba15a1d1_2d303b07","updated":"2015-09-22 03:54:03.000000000","message":"Arg, lazy evaluation fail, guess the number of objects that are evaluated doesn\u0027t shrink so much.","commit_id":"62d5b9e61a10db71d8da24614f48825866441276"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c2d04a7f59cba9385072eecfcb9d5ecf50aefe6f","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                cls_name \u003d filter_.__class__.__name__"},{"line_number":87,"context_line":"                start_count \u003d len(list_objs)"},{"line_number":88,"context_line":"                watch.restart()"},{"line_number":89,"context_line":"                objs_it \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":90,"context_line":"                watch.stop()"},{"line_number":91,"context_line":"                if objs_it is None:"},{"line_number":92,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_aab1ed90","line":89,"updated":"2015-09-24 01:55:23.000000000","message":"I think we count this useless, this just return a generator.","commit_id":"e47b8c9d5ea94221b407eac8991313990e239f44"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"1e130fb8cb529346ac75b7ff5434f5385d8ef81e","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                cls_name \u003d filter_.__class__.__name__"},{"line_number":87,"context_line":"                start_count \u003d len(list_objs)"},{"line_number":88,"context_line":"                watch.restart()"},{"line_number":89,"context_line":"                objs_it \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":90,"context_line":"                watch.stop()"},{"line_number":91,"context_line":"                if objs_it is None:"},{"line_number":92,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_1696fbef","line":89,"in_reply_to":"ba15a1d1_aab1ed90","updated":"2015-09-24 07:05:27.000000000","message":"++","commit_id":"e47b8c9d5ea94221b407eac8991313990e239f44"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"1e130fb8cb529346ac75b7ff5434f5385d8ef81e","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                watch.restart()"},{"line_number":89,"context_line":"                objs_it \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":90,"context_line":"                watch.stop()"},{"line_number":91,"context_line":"                if objs_it is None:"},{"line_number":92,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\""},{"line_number":93,"context_line":"                              \" (it took %0.2f seconds to recommend this)\","},{"line_number":94,"context_line":"                              cls_name, watch.elapsed())"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_965f6b40","line":91,"updated":"2015-09-24 07:05:27.000000000","message":"This will never hold true because the generator returned will never be None. It means watch.elapsed() will never ever be called below.","commit_id":"e47b8c9d5ea94221b407eac8991313990e239f44"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"aef4227de151ad7abe7a95298635e83f9dd23f18","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                watch.restart()"},{"line_number":89,"context_line":"                objs_it \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":90,"context_line":"                watch.stop()"},{"line_number":91,"context_line":"                if objs_it is None:"},{"line_number":92,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\""},{"line_number":93,"context_line":"                              \" (it took %0.2f seconds to recommend this)\","},{"line_number":94,"context_line":"                              cls_name, watch.elapsed())"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_6fbb8c0f","line":91,"in_reply_to":"9a1a9d01_2c77e703","updated":"2015-09-24 18:45:18.000000000","message":"Sorry, I was talking about the existing code, not your change. However I have to admit I was wrong about this being unreachable, I forgot about cells :(\n\nLooking into cells however revealed another problem because cells filters override filter_all() and return lists instead of generators, meaning for cells the actual filtering take place in the call to filter_all() itself.\n\nHave a look at the filters in nova/cells/filters.","commit_id":"e47b8c9d5ea94221b407eac8991313990e239f44"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"9aae7d93a470aa4c964035815cf50135fb6bdc70","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                watch.restart()"},{"line_number":89,"context_line":"                objs_it \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":90,"context_line":"                watch.stop()"},{"line_number":91,"context_line":"                if objs_it is None:"},{"line_number":92,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\""},{"line_number":93,"context_line":"                              \" (it took %0.2f seconds to recommend this)\","},{"line_number":94,"context_line":"                              cls_name, watch.elapsed())"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_ee1779a1","line":91,"in_reply_to":"9a1a9d01_6fbb8c0f","updated":"2015-09-25 15:38:31.000000000","message":"Haha, thats sad...\n\nConsistency fail...","commit_id":"e47b8c9d5ea94221b407eac8991313990e239f44"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"d8acf95f2f49ee7a8456e80ec1eeaad4a1eed711","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                watch.restart()"},{"line_number":89,"context_line":"                objs_it \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":90,"context_line":"                watch.stop()"},{"line_number":91,"context_line":"                if objs_it is None:"},{"line_number":92,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\""},{"line_number":93,"context_line":"                              \" (it took %0.2f seconds to recommend this)\","},{"line_number":94,"context_line":"                              cls_name, watch.elapsed())"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_2c77e703","line":91,"in_reply_to":"ba15a1d1_965f6b40","updated":"2015-09-24 15:44:00.000000000","message":"This is existing code.... It seems like part of the existing API so I\u0027m not sure why it would \u0027never hold true\u0027.","commit_id":"e47b8c9d5ea94221b407eac8991313990e239f44"}]}
