)]}'
{"horizon/templatetags/sizeformat.py":[{"author":{"_account_id":4978,"name":"Julie Pichon","email":"jpichon@redhat.com","username":"jpichon"},"change_message_id":"2f2376c2e48860d248d0756fcf7a511a7417f6bc","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                \"%(size)d bytes\", 0) % {\u0027size\u0027: 0}"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if bytes \u003d\u003d float(\"inf\"):"},{"line_number":49,"context_line":"        return translation.ugettext_lazy(\"inf\")"},{"line_number":50,"context_line":"    if bytes \u003c 1024:"},{"line_number":51,"context_line":"        return translation.ungettext_lazy(\"%(size)d\","},{"line_number":52,"context_line":"                \"%(size)d\", bytes) % {\u0027size\u0027: bytes}"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FWAs%3D","line":49,"updated":"2013-10-17 14:25:44.000000000","message":"Although this is a good idea (please feel free to open a new bug to track it!), it\u0027s inconsistent with the way we handle \"infinite\" quotas in other places at the moment, as \u0027inf\u0027 is not marked as translatable anywhere else. Here we would end up with \"inf\" sometimes translated and sometimes not on the same set of graphs.\n\nI think it will require a bit more thinking to make sure it makes sense in other languages, and it likely even first requires some thinking on how to better handle the value in English (\"inf\" isn\u0027t the best way to express a number, there are other places where we write \u0027No Limit\u0027 instead, this could be a way to improve on it).\n\nFor now I would suggest simply returning float(\"inf\") as is, when an infinite value is received, like we do everywhere else. And maybe also check for bytes \u003d\u003d -1 for the sake of completeness, since this is the literal representation of infinite quotas :)","commit_id":"4997dbc85d954726714502d47c1c191a74b3da11"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3f8f1b1f00be4c86a01e341929340d2c4048fb70","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        bytes \u003d float(bytes)"},{"line_number":44,"context_line":"    except (TypeError, ValueError, UnicodeDecodeError):"},{"line_number":45,"context_line":"        return translation.ungettext_lazy(\"%(size)d byte\","},{"line_number":46,"context_line":"                \"%(size)d bytes\", 0) % {\u0027size\u0027: 0}"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if (bytes \u003d\u003d float(\"inf\")) or (bytes \u003d\u003d -1):"},{"line_number":49,"context_line":"        return float(\"inf\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2BIy8%3D","line":46,"updated":"2013-12-02 05:19:02.000000000","message":"(it is not related to this patch) we don\u0027t need to use ungettext_lazy siince the third parameter is a constant.","commit_id":"928ac78e96b7551c53a1d22c9a1974222623f2b9"},{"author":{"_account_id":8305,"name":"floren","email":"florenllanos@gmail.com","username":"florenllanos"},"change_message_id":"2d82d49e46a40733d7dcfd0a944b1c2d5b05c860","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        bytes \u003d float(bytes)"},{"line_number":44,"context_line":"    except (TypeError, ValueError, UnicodeDecodeError):"},{"line_number":45,"context_line":"        return translation.ungettext_lazy(\"%(size)d byte\","},{"line_number":46,"context_line":"                \"%(size)d bytes\", 0) % {\u0027size\u0027: 0}"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if (bytes \u003d\u003d float(\"inf\")) or (bytes \u003d\u003d -1):"},{"line_number":49,"context_line":"        return float(\"inf\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F9%2BME%3D","line":46,"in_reply_to":"AAAATn%2F%2BIy8%3D","updated":"2013-12-03 21:44:21.000000000","message":"I can try to resolve it. I can do it in this patch or It\u0027s necesary to do in a new?","commit_id":"928ac78e96b7551c53a1d22c9a1974222623f2b9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3f8f1b1f00be4c86a01e341929340d2c4048fb70","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                \"%(size)d bytes\", 0) % {\u0027size\u0027: 0}"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if (bytes \u003d\u003d float(\"inf\")) or (bytes \u003d\u003d -1):"},{"line_number":49,"context_line":"        return float(\"inf\")"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    if bytes \u003c 1024:"},{"line_number":52,"context_line":"        return translation.ungettext_lazy(\"%(size)d\","}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2BIzA%3D","line":49,"updated":"2013-12-02 05:19:02.000000000","message":"The type of return value looks inconsistent. This method filesizeformat returns a string in general, but a float(\"inf\") is not a string. I think it is based on the comment in patch set 2. Though I am okay to return float(\"inf\"), if so please add a comment to describe why we need to use a different type in a return value.","commit_id":"928ac78e96b7551c53a1d22c9a1974222623f2b9"},{"author":{"_account_id":8305,"name":"floren","email":"florenllanos@gmail.com","username":"florenllanos"},"change_message_id":"2d82d49e46a40733d7dcfd0a944b1c2d5b05c860","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                \"%(size)d bytes\", 0) % {\u0027size\u0027: 0}"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if (bytes \u003d\u003d float(\"inf\")) or (bytes \u003d\u003d -1):"},{"line_number":49,"context_line":"        return float(\"inf\")"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    if bytes \u003c 1024:"},{"line_number":52,"context_line":"        return translation.ungettext_lazy(\"%(size)d\","}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F9%2BMc%3D","line":49,"in_reply_to":"AAAATn%2F%2BIzA%3D","updated":"2013-12-03 21:44:21.000000000","message":"I haven\u0027t a good reason to return a different value than a String. I put it by reading comment patch set 2 without thinking in depth (maybe I don\u0027t understood correctly this comment). I not see why this should be different. If nobody think different I think that it\u0027s better return a string like the other returns in this method, to make it consistent.","commit_id":"928ac78e96b7551c53a1d22c9a1974222623f2b9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3f8f1b1f00be4c86a01e341929340d2c4048fb70","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    if bytes \u003c 1024:"},{"line_number":52,"context_line":"        return translation.ungettext_lazy(\"%(size)d\","},{"line_number":53,"context_line":"                \"%(size)d\", bytes) % {\u0027size\u0027: bytes}"},{"line_number":54,"context_line":"    if bytes \u003c 1024 * 1024:"},{"line_number":55,"context_line":"        return translation.ugettext_lazy(\"%s KB\") % \\"},{"line_number":56,"context_line":"            filesize_number_format(bytes / 1024)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2BIzg%3D","line":53,"updated":"2013-12-02 05:19:02.000000000","message":"(it is not related to this patch) L.45 and L.52 are inconsistent. When \"bytes\u003d\u003d0\" we have a string \"0 byte\". On the other hand, when bytes is 1-1023, we have a string like \"100\" without a unit.","commit_id":"928ac78e96b7551c53a1d22c9a1974222623f2b9"},{"author":{"_account_id":8305,"name":"floren","email":"florenllanos@gmail.com","username":"florenllanos"},"change_message_id":"2d82d49e46a40733d7dcfd0a944b1c2d5b05c860","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    if bytes \u003c 1024:"},{"line_number":52,"context_line":"        return translation.ungettext_lazy(\"%(size)d\","},{"line_number":53,"context_line":"                \"%(size)d\", bytes) % {\u0027size\u0027: bytes}"},{"line_number":54,"context_line":"    if bytes \u003c 1024 * 1024:"},{"line_number":55,"context_line":"        return translation.ugettext_lazy(\"%s KB\") % \\"},{"line_number":56,"context_line":"            filesize_number_format(bytes / 1024)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F9%2BL4%3D","line":53,"in_reply_to":"AAAATn%2F%2BIzg%3D","updated":"2013-12-03 21:44:21.000000000","message":"I can try to resolve it. I can do it in this commit or It\u0027s necesary to do in a new (in the same of the first comment)?","commit_id":"928ac78e96b7551c53a1d22c9a1974222623f2b9"}],"horizon/test/tests/sizeformat.py":[{"author":{"_account_id":6914,"name":"Tatiana Ovchinnikova","email":"t.v.ovtchinnikova@gmail.com","username":"tmazur"},"change_message_id":"ada7b2b241c85271d1b0c441faf8b11784bff87f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"from horizon.test import helpers as test"},{"line_number":2,"context_line":"from horizon.templatetags import sizeformat"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"class SizeFormatTest(test.TestCase):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2ByPQ%3D","line":2,"updated":"2013-11-20 08:34:03.000000000","message":"Please move second line to the first place to make pep8 happy.","commit_id":"ee888b320984fc15ccd2c19f2c0b5a96e0707aca"}]}
