)]}'
{"jenkins/__init__.py":[{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"1d407d712ae89ded9bf4540ad02ed055e1bc34b1","unresolved":false,"context_lines":[{"line_number":333,"context_line":"    def get_plugin_info(self, name\u003dNone):"},{"line_number":334,"context_line":"        \"\"\"Get installed plugins information on this Master."},{"line_number":335,"context_line":"        This method when called with no parameters will return all installed plugins."},{"line_number":336,"context_line":"        Passing in a plugin name will return info about that that specific plugin,"},{"line_number":337,"context_line":"        returns None if the specified plugin is not installed."},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        :param name: None or Name of plugin, ``str``"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_d0e883b6","line":336,"updated":"2014-09-25 05:12:00.000000000","message":"lines are too long.  duplicate word, \u0027that\u0027","commit_id":"ddadcd6dbba2ef7e48b21bcec3d42148443b906b"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"d6dafdf6ac5270d7cb4b65224fa7327399b39faf","unresolved":false,"context_lines":[{"line_number":333,"context_line":"    def get_plugin_info(self, name\u003dNone):"},{"line_number":334,"context_line":"        \"\"\"Get installed plugins information on this Master."},{"line_number":335,"context_line":"        This method when called with no parameters will return all installed plugins."},{"line_number":336,"context_line":"        Passing in a plugin name will return info about that that specific plugin,"},{"line_number":337,"context_line":"        returns None if the specified plugin is not installed."},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        :param name: None or Name of plugin, ``str``"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_701c37c2","line":336,"in_reply_to":"da9df570_d0e883b6","updated":"2014-09-25 05:20:13.000000000","message":"Done","commit_id":"ddadcd6dbba2ef7e48b21bcec3d42148443b906b"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"99a6d04147913cb983ea7212e403c8aaef4e165a","unresolved":false,"context_lines":[{"line_number":60,"context_line":"LAUNCHER_WINDOWS_SERVICE \u003d \u0027hudson.os.windows.ManagedWindowsServiceLauncher\u0027"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"INFO \u003d \u0027api/json\u0027"},{"line_number":63,"context_line":"PLUGIN_INFO \u003d \u0027pluginManager/api/json?depth\u003d2\u0027"},{"line_number":64,"context_line":"CRUMB_URL \u003d \u0027crumbIssuer/api/json\u0027"},{"line_number":65,"context_line":"JOB_INFO \u003d \u0027job/%(name)s/api/json?depth\u003d%(depth)s\u0027"},{"line_number":66,"context_line":"JOB_NAME \u003d \u0027job/%(name)s/api/json?tree\u003dname\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_d4e680af","line":63,"updated":"2014-09-26 20:51:31.000000000","message":"Might want to make depth an option to get_plugin_info() just like get_job_info().","commit_id":"3384b5dbe9d252090f18cd513ae8a15eadbc12fa"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"f8365424ae013a65e5de2e99d123ea79c5c7e45c","unresolved":false,"context_lines":[{"line_number":60,"context_line":"LAUNCHER_WINDOWS_SERVICE \u003d \u0027hudson.os.windows.ManagedWindowsServiceLauncher\u0027"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"INFO \u003d \u0027api/json\u0027"},{"line_number":63,"context_line":"PLUGIN_INFO \u003d \u0027pluginManager/api/json?depth\u003d2\u0027"},{"line_number":64,"context_line":"CRUMB_URL \u003d \u0027crumbIssuer/api/json\u0027"},{"line_number":65,"context_line":"JOB_INFO \u003d \u0027job/%(name)s/api/json?depth\u003d%(depth)s\u0027"},{"line_number":66,"context_line":"JOB_NAME \u003d \u0027job/%(name)s/api/json?tree\u003dname\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_ffa43da7","line":63,"in_reply_to":"da9df570_d4e680af","updated":"2014-09-26 21:43:34.000000000","message":"Done.  depth\u003d0 return an empty dict, depth\u003d1 returns installed list of plugins (without dependencies), depth\u003d2 returns installed list of plugins including each plugin\u0027s dependencies.  I set it to default to 2.","commit_id":"3384b5dbe9d252090f18cd513ae8a15eadbc12fa"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"99a6d04147913cb983ea7212e403c8aaef4e165a","unresolved":false,"context_lines":[{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        This method when called with no parameters will return"},{"line_number":337,"context_line":"        a list containing all installed plugins on master. Passing"},{"line_number":338,"context_line":"        in a plugin name will return info about that specific plugin."},{"line_number":339,"context_line":"        Returns None if the specified plugin is not installed."},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        :param name: None or Name of plugin, ``str``"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_74bf94aa","line":338,"updated":"2014-09-26 20:51:31.000000000","message":"Mention the plugins can be queried by either short or long name and it must be an exact match.","commit_id":"3384b5dbe9d252090f18cd513ae8a15eadbc12fa"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"f8365424ae013a65e5de2e99d123ea79c5c7e45c","unresolved":false,"context_lines":[{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        This method when called with no parameters will return"},{"line_number":337,"context_line":"        a list containing all installed plugins on master. Passing"},{"line_number":338,"context_line":"        in a plugin name will return info about that specific plugin."},{"line_number":339,"context_line":"        Returns None if the specified plugin is not installed."},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        :param name: None or Name of plugin, ``str``"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_ffcb5d50","line":338,"in_reply_to":"da9df570_74bf94aa","updated":"2014-09-26 21:43:34.000000000","message":"Done","commit_id":"3384b5dbe9d252090f18cd513ae8a15eadbc12fa"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"99a6d04147913cb983ea7212e403c8aaef4e165a","unresolved":false,"context_lines":[{"line_number":363,"context_line":""},{"line_number":364,"context_line":"            info \u003d None"},{"line_number":365,"context_line":"            if name is None:"},{"line_number":366,"context_line":"                info \u003d plugins"},{"line_number":367,"context_line":"            else:"},{"line_number":368,"context_line":"                for plugin in plugins[\u0027plugins\u0027]:"},{"line_number":369,"context_line":"                    if plugin[\u0027longName\u0027] \u003d\u003d name or plugin[\u0027shortName\u0027] \u003d\u003d name:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_9406b884","line":366,"updated":"2014-09-26 20:51:31.000000000","message":"I would just:\n\n   return plugins\n\nAnd drop the else and level of indent below.  But that is coding style, depends whether you like early returns or a single one at the end.","commit_id":"3384b5dbe9d252090f18cd513ae8a15eadbc12fa"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"f8365424ae013a65e5de2e99d123ea79c5c7e45c","unresolved":false,"context_lines":[{"line_number":363,"context_line":""},{"line_number":364,"context_line":"            info \u003d None"},{"line_number":365,"context_line":"            if name is None:"},{"line_number":366,"context_line":"                info \u003d plugins"},{"line_number":367,"context_line":"            else:"},{"line_number":368,"context_line":"                for plugin in plugins[\u0027plugins\u0027]:"},{"line_number":369,"context_line":"                    if plugin[\u0027longName\u0027] \u003d\u003d name or plugin[\u0027shortName\u0027] \u003d\u003d name:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_1fc90159","line":366,"in_reply_to":"da9df570_9406b884","updated":"2014-09-26 21:43:34.000000000","message":"Done","commit_id":"3384b5dbe9d252090f18cd513ae8a15eadbc12fa"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"99a6d04147913cb983ea7212e403c8aaef4e165a","unresolved":false,"context_lines":[{"line_number":367,"context_line":"            else:"},{"line_number":368,"context_line":"                for plugin in plugins[\u0027plugins\u0027]:"},{"line_number":369,"context_line":"                    if plugin[\u0027longName\u0027] \u003d\u003d name or plugin[\u0027shortName\u0027] \u003d\u003d name:"},{"line_number":370,"context_line":"                        info \u003d plugin"},{"line_number":371,"context_line":"            return info"},{"line_number":372,"context_line":"        except HTTPError:"},{"line_number":373,"context_line":"            raise JenkinsException(\"Error communicating with server[%s]\""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_b432dc5c","line":370,"updated":"2014-09-26 20:51:31.000000000","message":"Since there is an exact match, you can return early:\n\n return plugin\n\n\nWith the suggestion above, \u0027info\u0027 can be removed entirely.","commit_id":"3384b5dbe9d252090f18cd513ae8a15eadbc12fa"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"f8365424ae013a65e5de2e99d123ea79c5c7e45c","unresolved":false,"context_lines":[{"line_number":367,"context_line":"            else:"},{"line_number":368,"context_line":"                for plugin in plugins[\u0027plugins\u0027]:"},{"line_number":369,"context_line":"                    if plugin[\u0027longName\u0027] \u003d\u003d name or plugin[\u0027shortName\u0027] \u003d\u003d name:"},{"line_number":370,"context_line":"                        info \u003d plugin"},{"line_number":371,"context_line":"            return info"},{"line_number":372,"context_line":"        except HTTPError:"},{"line_number":373,"context_line":"            raise JenkinsException(\"Error communicating with server[%s]\""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_3fc24534","line":370,"in_reply_to":"da9df570_b432dc5c","updated":"2014-09-26 21:43:34.000000000","message":"Done","commit_id":"3384b5dbe9d252090f18cd513ae8a15eadbc12fa"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"99a6d04147913cb983ea7212e403c8aaef4e165a","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                                   % self.server)"},{"line_number":378,"context_line":"        except ValueError:"},{"line_number":379,"context_line":"            raise JenkinsException(\"Could not parse JSON info for server[%s]\""},{"line_number":380,"context_line":"                                   % self.server)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def get_jobs(self):"},{"line_number":383,"context_line":"        \"\"\"Get list of jobs running."}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_b4801cc1","line":380,"updated":"2014-09-26 20:51:31.000000000","message":"One day we will have to make those three exceptions a decorator to avoid copy pasting them :-]","commit_id":"3384b5dbe9d252090f18cd513ae8a15eadbc12fa"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"f8365424ae013a65e5de2e99d123ea79c5c7e45c","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                                   % self.server)"},{"line_number":378,"context_line":"        except ValueError:"},{"line_number":379,"context_line":"            raise JenkinsException(\"Could not parse JSON info for server[%s]\""},{"line_number":380,"context_line":"                                   % self.server)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def get_jobs(self):"},{"line_number":383,"context_line":"        \"\"\"Get list of jobs running."}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_5fbf09aa","line":380,"in_reply_to":"da9df570_b4801cc1","updated":"2014-09-26 21:43:34.000000000","message":"Done","commit_id":"3384b5dbe9d252090f18cd513ae8a15eadbc12fa"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"efc12fa9751a5671873010b124e44e0d542baad3","unresolved":false,"context_lines":[{"line_number":365,"context_line":""},{"line_number":366,"context_line":"            if name is None:"},{"line_number":367,"context_line":"                return plugins"},{"line_number":368,"context_line":"            else:"},{"line_number":369,"context_line":"                for plugin in plugins[\u0027plugins\u0027]:"},{"line_number":370,"context_line":"                    if plugin[\u0027longName\u0027] \u003d\u003d name or plugin[\u0027shortName\u0027] \u003d\u003d name:"},{"line_number":371,"context_line":"                        return plugin"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_2b48f25a","line":368,"updated":"2014-09-29 13:24:17.000000000","message":"That else: is no more needed since we return early. That saves a level of indentation.","commit_id":"17c976b3157c139172ddf7808cbce642e956af7d"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"ffd025135d28c8cb763d984593b924ff98025af1","unresolved":false,"context_lines":[{"line_number":365,"context_line":""},{"line_number":366,"context_line":"            if name is None:"},{"line_number":367,"context_line":"                return plugins"},{"line_number":368,"context_line":"            else:"},{"line_number":369,"context_line":"                for plugin in plugins[\u0027plugins\u0027]:"},{"line_number":370,"context_line":"                    if plugin[\u0027longName\u0027] \u003d\u003d name or plugin[\u0027shortName\u0027] \u003d\u003d name:"},{"line_number":371,"context_line":"                        return plugin"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_f63b2636","line":368,"in_reply_to":"baa201ad_2b48f25a","updated":"2014-09-29 17:29:49.000000000","message":"Done","commit_id":"17c976b3157c139172ddf7808cbce642e956af7d"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"efc12fa9751a5671873010b124e44e0d542baad3","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                for plugin in plugins[\u0027plugins\u0027]:"},{"line_number":370,"context_line":"                    if plugin[\u0027longName\u0027] \u003d\u003d name or plugin[\u0027shortName\u0027] \u003d\u003d name:"},{"line_number":371,"context_line":"                        return plugin"},{"line_number":372,"context_line":"            return None"},{"line_number":373,"context_line":"        except HTTPError:"},{"line_number":374,"context_line":"            raise JenkinsException(\"Error communicating with server[%s]\""},{"line_number":375,"context_line":"                                   % self.server)"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_2b5f1210","line":372,"updated":"2014-09-29 13:24:17.000000000","message":"The function returns None by default but I don\u0027t mind keeping this return which make it explicit that we might not find a plugin and thus return None. So keep it :]","commit_id":"17c976b3157c139172ddf7808cbce642e956af7d"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"ffd025135d28c8cb763d984593b924ff98025af1","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                for plugin in plugins[\u0027plugins\u0027]:"},{"line_number":370,"context_line":"                    if plugin[\u0027longName\u0027] \u003d\u003d name or plugin[\u0027shortName\u0027] \u003d\u003d name:"},{"line_number":371,"context_line":"                        return plugin"},{"line_number":372,"context_line":"            return None"},{"line_number":373,"context_line":"        except HTTPError:"},{"line_number":374,"context_line":"            raise JenkinsException(\"Error communicating with server[%s]\""},{"line_number":375,"context_line":"                                   % self.server)"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_36468ec0","line":372,"in_reply_to":"baa201ad_2b5f1210","updated":"2014-09-29 17:29:49.000000000","message":"Done","commit_id":"17c976b3157c139172ddf7808cbce642e956af7d"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"744741016fe2fcea2c5ac3ff1dc4be19c9bed7b3","unresolved":false,"context_lines":[{"line_number":330,"context_line":"            raise JenkinsException(\"Could not parse JSON info for server[%s]\""},{"line_number":331,"context_line":"                                   % self.server)"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def get_plugin_info(self, name\u003dNone, depth\u003d2):"},{"line_number":334,"context_line":"        \"\"\"Get installed plugins information on this Master."},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        This method when called with no parameters will return"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_2ff2736f","line":333,"updated":"2014-10-01 23:07:38.000000000","message":"I would suggest creating get_plugins_info(self, depth\u003d2) AND get_plugin_info(self, name, depth\u003d2).\n\nThe method name will make the expected return explicit:\n- get_plugins_info always return a list of dicts (or None)\n- get_plugin_info always return a dict (or None)\n\nget_plugin_info could (re)use get_plugins_info and filter its output.\n\nExplicit is better than implicit.","commit_id":"e324f24f2abd27669da43050bb77a89149a181f1"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"eac9fd0049522d91920339fd3b99619ea58cf164","unresolved":false,"context_lines":[{"line_number":330,"context_line":"            raise JenkinsException(\"Could not parse JSON info for server[%s]\""},{"line_number":331,"context_line":"                                   % self.server)"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def get_plugin_info(self, name\u003dNone, depth\u003d2):"},{"line_number":334,"context_line":"        \"\"\"Get installed plugins information on this Master."},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        This method when called with no parameters will return"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_92440d1c","line":333,"in_reply_to":"baa201ad_1c7bd6f5","updated":"2014-10-06 18:46:43.000000000","message":"We don\u0027t need function overloading.\n\nWhat I suggest is 2 distinct methods (instead of one doing both):\n- one to get \"many\" plugins: get_plugins_info(self, depth\u003d2)\n- one to get \"one\" plugin: get_plugin_info(self, name, depth\u003d2)\n\nAny decent library makes a distinction between methods returning \"many\" and those returning \"one\", list() vs get(). See any OpenStack client libraries.","commit_id":"e324f24f2abd27669da43050bb77a89149a181f1"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"4fe4579445b095ac87766c73192db2f827262a3f","unresolved":false,"context_lines":[{"line_number":330,"context_line":"            raise JenkinsException(\"Could not parse JSON info for server[%s]\""},{"line_number":331,"context_line":"                                   % self.server)"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def get_plugin_info(self, name\u003dNone, depth\u003d2):"},{"line_number":334,"context_line":"        \"\"\"Get installed plugins information on this Master."},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        This method when called with no parameters will return"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_55bae1c0","line":333,"in_reply_to":"baa201ad_2ff2736f","updated":"2014-10-02 06:41:08.000000000","message":"How would you feel about the same method as proposed except that it always returns a list (or None)?  \n\n* if name is not specified return a list of all plugins\n* if a plugin name is specified and it is installed then return a list of one plugin?\n* if there are no plugins or the named plugin cannot be found then return an empty list?","commit_id":"e324f24f2abd27669da43050bb77a89149a181f1"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"b72156b45e6221ac9601f607dd365491e14123c3","unresolved":false,"context_lines":[{"line_number":330,"context_line":"            raise JenkinsException(\"Could not parse JSON info for server[%s]\""},{"line_number":331,"context_line":"                                   % self.server)"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def get_plugin_info(self, name\u003dNone, depth\u003d2):"},{"line_number":334,"context_line":"        \"\"\"Get installed plugins information on this Master."},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        This method when called with no parameters will return"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_d6f06969","line":333,"in_reply_to":"baa201ad_55bae1c0","updated":"2014-10-03 22:09:38.000000000","message":"I still prefer explicit over implicit/automagic.","commit_id":"e324f24f2abd27669da43050bb77a89149a181f1"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"0b072b6a08454c32558e8b2b79b3393a3af5f1ea","unresolved":false,"context_lines":[{"line_number":330,"context_line":"            raise JenkinsException(\"Could not parse JSON info for server[%s]\""},{"line_number":331,"context_line":"                                   % self.server)"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def get_plugin_info(self, name\u003dNone, depth\u003d2):"},{"line_number":334,"context_line":"        \"\"\"Get installed plugins information on this Master."},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        This method when called with no parameters will return"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_ed173eec","line":333,"in_reply_to":"baa201ad_92440d1c","updated":"2014-10-06 19:34:02.000000000","message":"Ahh. I didn\u0027t notice the \u0027s\u0027 in your suggestion for the method name.   You\u0027ve convince me, thanks for pointing out that pattern in the openstack libraries.","commit_id":"e324f24f2abd27669da43050bb77a89149a181f1"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"e7ed5480882469c421ab1e0e66850aa9fd1580d3","unresolved":false,"context_lines":[{"line_number":330,"context_line":"            raise JenkinsException(\"Could not parse JSON info for server[%s]\""},{"line_number":331,"context_line":"                                   % self.server)"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def get_plugin_info(self, name\u003dNone, depth\u003d2):"},{"line_number":334,"context_line":"        \"\"\"Get installed plugins information on this Master."},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        This method when called with no parameters will return"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_1c7bd6f5","line":333,"in_reply_to":"baa201ad_d6f06969","updated":"2014-10-06 17:47:23.000000000","message":"I believe python function overloading is only supported in python 3 however we still need to support python 2.6 \u0026 2.7.  I think it\u0027s possible to make method overloading work in python 2.7 but since that feature is not supported in the core language I don\u0027t think it\u0027s the pythonic way to handle this situation.  If we still one 2 functions to get plugin info then an option would be to create 2 different function names like get_all_plugin_info(self, depth\u003d2) \u0026 get_plugin_info(self, name, depth\u003d2). \n\nWith that being said, I still prefer one function over two in this case, even if function overloading is supported.","commit_id":"e324f24f2abd27669da43050bb77a89149a181f1"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"744741016fe2fcea2c5ac3ff1dc4be19c9bed7b3","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        \"\"\""},{"line_number":362,"context_line":"        try:"},{"line_number":363,"context_line":"            plugins \u003d json.loads(self.jenkins_open("},{"line_number":364,"context_line":"                Request(self.server + PLUGIN_INFO % locals())))"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"            if name is None:"},{"line_number":367,"context_line":"                return plugins"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_affd833d","line":364,"updated":"2014-10-01 23:07:38.000000000","message":"Can we make the use of depth explicit? At first glance, I thought it was unused. I know that other methods use locals() but I think it\u0027s a problem. We should address it afterward in a different change.","commit_id":"e324f24f2abd27669da43050bb77a89149a181f1"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"4fe4579445b095ac87766c73192db2f827262a3f","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        \"\"\""},{"line_number":362,"context_line":"        try:"},{"line_number":363,"context_line":"            plugins \u003d json.loads(self.jenkins_open("},{"line_number":364,"context_line":"                Request(self.server + PLUGIN_INFO % locals())))"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"            if name is None:"},{"line_number":367,"context_line":"                return plugins"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa201ad_352c7d02","line":364,"in_reply_to":"baa201ad_affd833d","updated":"2014-10-02 06:41:08.000000000","message":"that sounds like a good idea but i\u0027m not sure what that actually means.  what would that look like?","commit_id":"e324f24f2abd27669da43050bb77a89149a181f1"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"958cffa43afe62ed273b78d16750ea09dc3c38e6","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        Example::"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"            \u003e\u003e\u003e j \u003d Jenkins()"},{"line_number":370,"context_line":"            \u003e\u003e\u003e info \u003d j.get_plugin_info(\"Gearman Plugin\")"},{"line_number":371,"context_line":"            \u003e\u003e\u003e print(info)"},{"line_number":372,"context_line":"            {\"plugins\":["},{"line_number":373,"context_line":"            {u\u0027backupVersion\u0027: None, u\u0027version\u0027: u\u00270.0.4\u0027, u\u0027deleted\u0027: False,"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_48ce782f","line":370,"updated":"2014-10-06 20:27:24.000000000","message":"This example is no longer valid.","commit_id":"27bb964dfd4295f3b44ed538677aa5362a7cd8dd"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"7ec1dffab40f6e8656232efaa31a50c62dc793df","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        Example::"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"            \u003e\u003e\u003e j \u003d Jenkins()"},{"line_number":370,"context_line":"            \u003e\u003e\u003e info \u003d j.get_plugin_info(\"Gearman Plugin\")"},{"line_number":371,"context_line":"            \u003e\u003e\u003e print(info)"},{"line_number":372,"context_line":"            {\"plugins\":["},{"line_number":373,"context_line":"            {u\u0027backupVersion\u0027: None, u\u0027version\u0027: u\u00270.0.4\u0027, u\u0027deleted\u0027: False,"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_08a55046","line":370,"in_reply_to":"baa201ad_48ce782f","updated":"2014-10-06 20:31:36.000000000","message":"Done","commit_id":"27bb964dfd4295f3b44ed538677aa5362a7cd8dd"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"958cffa43afe62ed273b78d16750ea09dc3c38e6","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        This method retrieves information on a speicifc plugin."},{"line_number":400,"context_line":"        The passed in plugin name (short or long) must exactly match."},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        :param name: None or Name of plugin, ``str``"},{"line_number":403,"context_line":"        :param depth: JSON depth, ``int``"},{"line_number":404,"context_line":"        :returns: a specific plugin ``dict``,"},{"line_number":405,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_c8d988f4","line":402,"updated":"2014-10-06 20:27:24.000000000","message":"I don\u0027t think we should suggest to use the None valid.","commit_id":"27bb964dfd4295f3b44ed538677aa5362a7cd8dd"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"7ec1dffab40f6e8656232efaa31a50c62dc793df","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        This method retrieves information on a speicifc plugin."},{"line_number":400,"context_line":"        The passed in plugin name (short or long) must exactly match."},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        :param name: None or Name of plugin, ``str``"},{"line_number":403,"context_line":"        :param depth: JSON depth, ``int``"},{"line_number":404,"context_line":"        :returns: a specific plugin ``dict``,"},{"line_number":405,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_2865b41d","line":402,"in_reply_to":"baa201ad_c8d988f4","updated":"2014-10-06 20:31:36.000000000","message":"Done","commit_id":"27bb964dfd4295f3b44ed538677aa5362a7cd8dd"}],"tests/test_jenkins.py":[{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"1d407d712ae89ded9bf4540ad02ed055e1bc34b1","unresolved":false,"context_lines":[{"line_number":591,"context_line":"        j \u003d jenkins.Jenkins(\u0027http://example.com/\u0027, \u0027test\u0027, \u0027test\u0027)"},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"        plugin_info \u003d j.get_plugin_info(\"mailer\")"},{"line_number":594,"context_line":"        # expected to return info just one plugin"},{"line_number":595,"context_line":"        self.assertEqual(plugin_info, plugin_info_def[\u0027plugins\u0027][0])"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    @patch.object(jenkins.Jenkins, \u0027jenkins_open\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_10d20b00","line":594,"updated":"2014-09-25 05:12:00.000000000","message":"reword, \u0027info on a specific plugin\u0027","commit_id":"ddadcd6dbba2ef7e48b21bcec3d42148443b906b"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"d6dafdf6ac5270d7cb4b65224fa7327399b39faf","unresolved":false,"context_lines":[{"line_number":591,"context_line":"        j \u003d jenkins.Jenkins(\u0027http://example.com/\u0027, \u0027test\u0027, \u0027test\u0027)"},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"        plugin_info \u003d j.get_plugin_info(\"mailer\")"},{"line_number":594,"context_line":"        # expected to return info just one plugin"},{"line_number":595,"context_line":"        self.assertEqual(plugin_info, plugin_info_def[\u0027plugins\u0027][0])"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    @patch.object(jenkins.Jenkins, \u0027jenkins_open\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_5021f3f9","line":594,"in_reply_to":"da9df570_10d20b00","updated":"2014-09-25 05:20:13.000000000","message":"Done","commit_id":"ddadcd6dbba2ef7e48b21bcec3d42148443b906b"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"efc12fa9751a5671873010b124e44e0d542baad3","unresolved":false,"context_lines":[{"line_number":606,"context_line":"        self.assertEqual("},{"line_number":607,"context_line":"            jenkins_mock.call_args[0][0].get_full_url(),"},{"line_number":608,"context_line":"            u\u0027http://example.com/pluginManager/api/json?depth\u003d1\u0027)"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"    @patch.object(jenkins.Jenkins, \u0027jenkins_open\u0027)"},{"line_number":611,"context_line":"    def test_get_info__HTTPError(self, jenkins_mock):"},{"line_number":612,"context_line":"        jenkins_mock.side_effect \u003d jenkins.HTTPError("}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_8bab9e88","line":609,"updated":"2014-09-29 13:24:17.000000000","message":"When looking at the HTML coverage report:\n\n coverage run -m discover\n coverage html\n htmlcov/jenkins___init__.html\n\nThe get_plugin_info() are not covered unlike get_build_info() which has full coverage.\n\nShould be quite easy to copy paste the test methods for build_info, they are in tests/test_jenkins.py and prefixed: test_get_build_info","commit_id":"17c976b3157c139172ddf7808cbce642e956af7d"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"ffd025135d28c8cb763d984593b924ff98025af1","unresolved":false,"context_lines":[{"line_number":606,"context_line":"        self.assertEqual("},{"line_number":607,"context_line":"            jenkins_mock.call_args[0][0].get_full_url(),"},{"line_number":608,"context_line":"            u\u0027http://example.com/pluginManager/api/json?depth\u003d1\u0027)"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"    @patch.object(jenkins.Jenkins, \u0027jenkins_open\u0027)"},{"line_number":611,"context_line":"    def test_get_info__HTTPError(self, jenkins_mock):"},{"line_number":612,"context_line":"        jenkins_mock.side_effect \u003d jenkins.HTTPError("}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_d1dc6c77","line":609,"in_reply_to":"baa201ad_8bab9e88","updated":"2014-09-29 17:29:49.000000000","message":"Done","commit_id":"17c976b3157c139172ddf7808cbce642e956af7d"}]}
