)]}'
{"keystoneclient/models/formatter.py":[{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"ebfb6e99d2efe0e0c1663deb406d760f14767ceb","unresolved":false,"context_lines":[{"line_number":14,"context_line":"class Formatter(object):"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"    @classmethod"},{"line_number":17,"context_line":"    def get_token_data_v2(self, access_token):"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"        token \u003d {}"},{"line_number":20,"context_line":"        token_data \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aa745d1_a1189a85","line":17,"updated":"2015-04-16 14:00:24.000000000","message":"I\u0027m ready to be wrong here but the access token knows what sort it is doesn\u0027t it?   Or at least it can be determined whether it is V2 or V3 so couldn\u0027t the two methods here be collapsed into one with the divination encapsulated?  It would mean just one get_token_data method and a single entry point to the logic and some of the code could then be re-used.  There\u0027s a lot of duplication here.","commit_id":"23c961023f39388ce5b496f93ae699c807aec1d4"},{"author":{"_account_id":11333,"name":"David J Hu","email":"david.hu@hpe.com","username":"dhu"},"change_message_id":"aa214fd63152cdf9ef451d2228521ddd7662a05d","unresolved":false,"context_lines":[{"line_number":14,"context_line":"class Formatter(object):"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"    @classmethod"},{"line_number":17,"context_line":"    def get_token_data_v2(self, access_token):"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"        token \u003d {}"},{"line_number":20,"context_line":"        token_data \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aa745d1_eacb1271","line":17,"in_reply_to":"5aa745d1_a1189a85","updated":"2015-04-16 16:12:50.000000000","message":"I can add a get_token_data(...) method with logic to determine v2 or v3, then call into corresponding function.\n\nI like to keep the specifics of v2 and v3 separate for clarity.  There are enough differences between the 2 versions that would make the code hard to read if I merge the them.","commit_id":"23c961023f39388ce5b496f93ae699c807aec1d4"},{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"0a84c9b2d0834015298fc7ebd4e75aef1100de37","unresolved":false,"context_lines":[{"line_number":14,"context_line":"class Formatter(object):"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"    @classmethod"},{"line_number":17,"context_line":"    def get_token_data_v2(self, access_token):"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"        token \u003d {}"},{"line_number":20,"context_line":"        token_data \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ab451fb_e80d7138","line":17,"in_reply_to":"5aa745d1_eacb1271","updated":"2015-04-17 10:29:38.000000000","message":"I think that would be an improvement.  Otherwise in order to use this a check may be needed, if you include the code to do that check and make that the sole entry point then it\u0027d be far easier to work with.  Perhaps then make the two version specific methods private?","commit_id":"23c961023f39388ce5b496f93ae699c807aec1d4"}]}
