)]}'
{"test/unit/common/middleware/s3api/helpers.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"849cf685117991e465c6ae4c0a1e0bb291c65ffd","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    def register(self, method, path, response_class, headers, body):"},{"line_number":148,"context_line":"        # assuming the path format like /v1/account/container/object"},{"line_number":149,"context_line":"        resource_map \u003d [\u0027account\u0027, \u0027container\u0027, \u0027object\u0027]"},{"line_number":150,"context_line":"        index \u003d len(list(filter(None, split_path(path, 0, 4, True)[1:]))) - 1"},{"line_number":151,"context_line":"        resource \u003d resource_map[index]"},{"line_number":152,"context_line":"        if (method, path) in self._responses:"},{"line_number":153,"context_line":"            old_headers \u003d self._responses[(method, path)][1]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_11312d59","line":150,"updated":"2018-12-02 05:09:54.000000000","message":"maybe it\u0027s time to use  [item for item in iterable if item]  like he documentation for filter() suggests :-)  Frankly it\u0027s hard to imagine that it\u0027s the best way to return the number of aco components in a path, but whatever.","commit_id":"d75d15be7cbaeb66bfe8168e4b6cb2c21b341f23"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"98d8676e5f44b42cb7831d6a59bfda6d968e5a66","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    def register(self, method, path, response_class, headers, body):"},{"line_number":148,"context_line":"        # assuming the path format like /v1/account/container/object"},{"line_number":149,"context_line":"        resource_map \u003d [\u0027account\u0027, \u0027container\u0027, \u0027object\u0027]"},{"line_number":150,"context_line":"        index \u003d len(list(filter(None, split_path(path, 0, 4, True)[1:]))) - 1"},{"line_number":151,"context_line":"        resource \u003d resource_map[index]"},{"line_number":152,"context_line":"        if (method, path) in self._responses:"},{"line_number":153,"context_line":"            old_headers \u003d self._responses[(method, path)][1]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_117fedde","line":150,"in_reply_to":"3f79a3b5_11312d59","updated":"2018-12-02 05:29:38.000000000","message":"Ugh, yeah, this is... messy and unfortunate.\n\n len([part for part in split_path(path, 0, 4, True)[1:] if part]) - 1\n\nis an improvement... but it still seems silly to make a list just so we can take its length... would\n\n sum(1 for part in split_path(path, 0, 4, True)[1:] if part) - 1\n\nbe too obtuse? Still got that ugly \"[1:]\" and \"- 1\"...\n\nI agree with Pete -- there must be a better way to return the number of aco components in a path...","commit_id":"d75d15be7cbaeb66bfe8168e4b6cb2c21b341f23"}]}
