)]}'
{"keystone/auth/core.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"168987b52fa76f22878ec9e33b232b3fcb85f8a3","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                      {\u0027user_id\u0027: user_id})"},{"line_number":165,"context_line":"            return rule_set"},{"line_number":166,"context_line":"        elif not rules:"},{"line_number":167,"context_line":"            return rule_set"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        for r_list in rules:"},{"line_number":170,"context_line":"            if not isinstance(r_list, list):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_b0e95bb9","side":"PARENT","line":167,"updated":"2017-01-31 15:14:05.000000000","message":"These two cases could probably be combined:\n\n  rule_set \u003d []\n  if not rules or not isinstance(rules, list):\n      # NOTE(notmorgan): If the rules aren\u0027t a list, then we know the rules\n      # were somehow corrupted and we should not use them. If there are\n      # no rules available, then there is nothing for us to do and we can\n      # exit early.\n      # log message\n      return rule_set","commit_id":"c4881c1c00de436d758c33caf63b1fffb838fed4"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"4b5a395b8d2ef1c3401855c3e2f6a22fac9e0ec3","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                      {\u0027user_id\u0027: user_id})"},{"line_number":165,"context_line":"            return rule_set"},{"line_number":166,"context_line":"        elif not rules:"},{"line_number":167,"context_line":"            return rule_set"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        for r_list in rules:"},{"line_number":170,"context_line":"            if not isinstance(r_list, list):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_c6eab1da","side":"PARENT","line":167,"in_reply_to":"3a461143_b0e95bb9","updated":"2017-01-31 15:51:14.000000000","message":"The reason they are not combined is for the error logging. It\u0027s going to have a conditional in either case. This seemed easiest to read. I\u0027m happy to re-spin if this is a blocker.","commit_id":"c4881c1c00de436d758c33caf63b1fffb838fed4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"168987b52fa76f22878ec9e33b232b3fcb85f8a3","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                # NOTE(notmorgan): No FOR/ELSE used here! Though it could be"},{"line_number":194,"context_line":"                # done and avoid the use of _ok_rule. This is a note for"},{"line_number":195,"context_line":"                # future developers to avoid using for/else and as an example"},{"line_number":196,"context_line":"                # of how to implement it that is readable and maintainable."},{"line_number":197,"context_line":"                if _ok_rule:"},{"line_number":198,"context_line":"                    # Unique the r_list and cast back to a list and then append"},{"line_number":199,"context_line":"                    # as we know the rule is ok (matches our requirements)."}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_70661352","line":196,"updated":"2017-01-31 15:14:05.000000000","message":"This note is begging for someone to come ask \"why\" we don\u0027t like for/else statements. We should elaborate on it here as well.","commit_id":"772c1c59c090c960a6c5651fb44da9045d4ae75e"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"4b5a395b8d2ef1c3401855c3e2f6a22fac9e0ec3","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                # NOTE(notmorgan): No FOR/ELSE used here! Though it could be"},{"line_number":194,"context_line":"                # done and avoid the use of _ok_rule. This is a note for"},{"line_number":195,"context_line":"                # future developers to avoid using for/else and as an example"},{"line_number":196,"context_line":"                # of how to implement it that is readable and maintainable."},{"line_number":197,"context_line":"                if _ok_rule:"},{"line_number":198,"context_line":"                    # Unique the r_list and cast back to a list and then append"},{"line_number":199,"context_line":"                    # as we know the rule is ok (matches our requirements)."}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_a6b685f6","line":196,"in_reply_to":"3a461143_70661352","updated":"2017-01-31 15:51:14.000000000","message":"Hehe....... i couldadjust the phrasing. \"This is an example of an implementation that is maintainable and intuative in contrast with fore/else statements.\"","commit_id":"772c1c59c090c960a6c5651fb44da9045d4ae75e"}]}
