)]}'
{"keystone/notifications.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"288f6201834e1ce45584f5edfa9d32f77af09045","unresolved":false,"context_lines":[{"line_number":55,"context_line":"DELETED \u003d NotificationAction(\u0027deleted\u0027)"},{"line_number":56,"context_line":"DISABLED \u003d NotificationAction(\u0027disabled\u0027)"},{"line_number":57,"context_line":"UPDATED \u003d NotificationAction(\u0027updated\u0027)"},{"line_number":58,"context_line":"INTERNAL \u003d NotificationAction(\u0027internal\u0027)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"ACTIONS \u003d frozenset([CREATED, DELETED, DISABLED, UPDATED, INTERNAL])"},{"line_number":61,"context_line":"# resource types that can be notified"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_5bad6ee8","line":58,"updated":"2014-08-28 00:05:32.000000000","message":"lol i\u0027m going to let bkhudson comment on this one since it was his nit a few patchsets ago :)","commit_id":"79d4fe1ce3a40a0c605244681112757fabbb9c52"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4b37e6b06acd46051ad3b1b649bc5b0c25e461ff","unresolved":false,"context_lines":[{"line_number":55,"context_line":"DELETED \u003d NotificationAction(\u0027deleted\u0027)"},{"line_number":56,"context_line":"DISABLED \u003d NotificationAction(\u0027disabled\u0027)"},{"line_number":57,"context_line":"UPDATED \u003d NotificationAction(\u0027updated\u0027)"},{"line_number":58,"context_line":"INTERNAL \u003d NotificationAction(\u0027internal\u0027)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"ACTIONS \u003d frozenset([CREATED, DELETED, DISABLED, UPDATED, INTERNAL])"},{"line_number":61,"context_line":"# resource types that can be notified"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_bba202ac","line":58,"in_reply_to":"1abeadc6_5bad6ee8","updated":"2014-08-28 00:21:34.000000000","message":"This wasn\u0027t my comment... it was to put these constants into a namespace...\n\nclass Action:\n  CREATED \u003d \u0027created\u0027\n  DELETED \u003d \u0027deleted\u0027\n  DISABLED \u003d \u0027disabled\u0027\n...\n\nI\u0027m not sure what the class for NotificationAction is getting us.\n\nAlso, it would be nice if ACTIONS was put in there somehow... make Action iterable? That might require an instance but be doable...\n\n class _Action:\n   def __iter__(self): ...\n\n Action \u003d _Action()","commit_id":"79d4fe1ce3a40a0c605244681112757fabbb9c52"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"c0594abcf611b147e876a0a1b1e9dd7abab82ec6","unresolved":false,"context_lines":[{"line_number":55,"context_line":"DELETED \u003d NotificationAction(\u0027deleted\u0027)"},{"line_number":56,"context_line":"DISABLED \u003d NotificationAction(\u0027disabled\u0027)"},{"line_number":57,"context_line":"UPDATED \u003d NotificationAction(\u0027updated\u0027)"},{"line_number":58,"context_line":"INTERNAL \u003d NotificationAction(\u0027internal\u0027)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"ACTIONS \u003d frozenset([CREATED, DELETED, DISABLED, UPDATED, INTERNAL])"},{"line_number":61,"context_line":"# resource types that can be notified"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_fbb1da01","line":58,"in_reply_to":"1abeadc6_5bad6ee8","updated":"2014-08-28 00:18:33.000000000","message":"Yeah, I figure this will get nixed as a pattern, but it saved a lot of referencing class methods in weird ways (or duplicating code)","commit_id":"79d4fe1ce3a40a0c605244681112757fabbb9c52"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"3ad86a020c69327b9d7718a1da47edee59624fb5","unresolved":false,"context_lines":[{"line_number":55,"context_line":"DELETED \u003d NotificationAction(\u0027deleted\u0027)"},{"line_number":56,"context_line":"DISABLED \u003d NotificationAction(\u0027disabled\u0027)"},{"line_number":57,"context_line":"UPDATED \u003d NotificationAction(\u0027updated\u0027)"},{"line_number":58,"context_line":"INTERNAL \u003d NotificationAction(\u0027internal\u0027)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"ACTIONS \u003d frozenset([CREATED, DELETED, DISABLED, UPDATED, INTERNAL])"},{"line_number":61,"context_line":"# resource types that can be notified"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_56a1c592","line":58,"in_reply_to":"1abeadc6_bba202ac","updated":"2014-08-28 01:12:44.000000000","message":"I misread your comment.\n\nIn either case I don\u0027t really see a benefit to namespacing these besides using more dots in the code. I don\u0027t think it\u0027s giving us anything we don\u0027t have now. Perhaps what we\u0027re looking for is a named tuple:\n\n  Actions \u003d NamedTuple(CREATED\u003d\u0027created\u0027, ...)\n\nthen we can reference:\n\n  Actions.CREATED\n\nor \n\n  for action in ACTIONS\n\netc","commit_id":"79d4fe1ce3a40a0c605244681112757fabbb9c52"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"245c30356091df3153b10ab29d9ea3c2d8a465b4","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        raise ValueError(_(\u0027%(event)s is not a valid notification event, must \u0027"},{"line_number":166,"context_line":"                           \u0027be one of: %(actions)s\u0027) %"},{"line_number":167,"context_line":"                         {\u0027event\u0027: event,"},{"line_number":168,"context_line":"                          \u0027actions\u0027: \u0027, \u0027.join(str(a) for a in ACTIONS)})"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    if not hasattr(callbacks, \u0027__iter__\u0027):"},{"line_number":171,"context_line":"        callbacks \u003d [callbacks]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_0d52c934","line":168,"updated":"2014-08-28 13:26:33.000000000","message":"six?","commit_id":"7b609714b24e5d4abc17218a78ded2d2a945eecd"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"a39428a7007d18d5f6c4e5ff8581c17994526d89","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        raise ValueError(_(\u0027%(event)s is not a valid notification event, must \u0027"},{"line_number":166,"context_line":"                           \u0027be one of: %(actions)s\u0027) %"},{"line_number":167,"context_line":"                         {\u0027event\u0027: event,"},{"line_number":168,"context_line":"                          \u0027actions\u0027: \u0027, \u0027.join(str(a) for a in ACTIONS)})"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    if not hasattr(callbacks, \u0027__iter__\u0027):"},{"line_number":171,"context_line":"        callbacks \u003d [callbacks]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_7384f70a","line":168,"in_reply_to":"1abeadc6_0d52c934","updated":"2014-08-28 15:33:42.000000000","message":"oooh this probably should have been six.text_type *doh*. easy to fix though.","commit_id":"7b609714b24e5d4abc17218a78ded2d2a945eecd"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"9e0e951d1c3dc4eb1fbd9a394bf78cbcab59a33e","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        raise ValueError(_(\u0027%(event)s is not a valid notification event, must \u0027"},{"line_number":166,"context_line":"                           \u0027be one of: %(actions)s\u0027) %"},{"line_number":167,"context_line":"                         {\u0027event\u0027: event,"},{"line_number":168,"context_line":"                          \u0027actions\u0027: \u0027, \u0027.join(str(a) for a in ACTIONS)})"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    if not hasattr(callbacks, \u0027__iter__\u0027):"},{"line_number":171,"context_line":"        callbacks \u003d [callbacks]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_b3a04f91","line":168,"in_reply_to":"1abeadc6_7384f70a","updated":"2014-08-28 15:34:16.000000000","message":"Actually, no, str() is superfluous here :P, these are already strings.","commit_id":"7b609714b24e5d4abc17218a78ded2d2a945eecd"}]}
