)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"e5a4daf6a26b090e270a4ccabe5cb85671a9af99","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Brandon Palm \u003cbapalm@us.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-25 11:04:36 -0600"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use isinstance instead of type"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adjusted conditional statements to use isinstance when"},{"line_number":10,"context_line":"comparing variables. Isinstance supports inheritance type"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9aed3d3a_674a54c7","line":7,"updated":"2016-02-26 12:24:48.000000000","message":"I don\u0027t agree with this patch.\n\n1. \"isinstance(...)\" and \"type(...) \u003d\u003d ...\"  are not interchangeable in all cases, and \"type(...) \u003d\u003d ...\" is not worse. Each of this check does its own mission.\n\nisinstance() is good if we *expect* subclasses, but type() is for cases when we check the type explicitly.\n\nIn this patch puts isinstance() in places when we do not expect subclasses at all, so this check at least confusing.\n\n2. Even if we speak about flexibility - consider that inheritance can completely break the code, for example http://paste.openstack.org/show/488347/\n\nFrom my point of view, this patch is useless.","commit_id":"8714f73f274caaaf7c6ee5f06e34f1e2cbfbf894"}],"rally/plugins/openstack/wrappers/network.py":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"e5a4daf6a26b090e270a4ccabe5cb85671a9af99","unresolved":false,"context_lines":[{"line_number":411,"context_line":"            raise ValueError(\"Missed tenant_id\")"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        net_id \u003d None"},{"line_number":414,"context_line":"        if isinstance(ext_network, dict):"},{"line_number":415,"context_line":"            net_id \u003d ext_network[\"id\"]"},{"line_number":416,"context_line":"        elif ext_network:"},{"line_number":417,"context_line":"            ext_net \u003d self.get_network(name\u003dext_network)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_e79f8401","line":414,"updated":"2016-02-26 12:24:48.000000000","message":"self.create_network() returns dict and only type of dict. Let\u0027s check this type explicitly by type()","commit_id":"8714f73f274caaaf7c6ee5f06e34f1e2cbfbf894"}],"rally/task/sla.py":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"e5a4daf6a26b090e270a4ccabe5cb85671a9af99","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        :returns: True if the SLA check passed, False otherwise"},{"line_number":191,"context_line":"        \"\"\""},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def validate_type(self, other):"},{"line_number":194,"context_line":"        if not isinstance(self, type(other)):"},{"line_number":195,"context_line":"            message \u003d _("},{"line_number":196,"context_line":"                \"Error merging SLAs of types %s, %s. \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_27784cc4","line":193,"updated":"2016-02-26 12:24:48.000000000","message":"So, this check should be renamed to validate_isinstance :)","commit_id":"8714f73f274caaaf7c6ee5f06e34f1e2cbfbf894"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"e5a4daf6a26b090e270a4ccabe5cb85671a9af99","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        \"\"\""},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def validate_type(self, other):"},{"line_number":194,"context_line":"        if not isinstance(self, type(other)):"},{"line_number":195,"context_line":"            message \u003d _("},{"line_number":196,"context_line":"                \"Error merging SLAs of types %s, %s. \""},{"line_number":197,"context_line":"                \"Only SLAs of the same type could be merged.\""}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_223b1ad3","line":194,"updated":"2016-02-26 12:24:48.000000000","message":"But we validate type, don\u0027t we?","commit_id":"8714f73f274caaaf7c6ee5f06e34f1e2cbfbf894"}],"rally/task/validation.py":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"e5a4daf6a26b090e270a4ccabe5cb85671a9af99","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    if integer_only:"},{"line_number":100,"context_line":"        # NOTE(boris-42): Force check that passed value is not float, this is"},{"line_number":101,"context_line":"        #                 important cause int(float_numb) won\u0027t raise exception"},{"line_number":102,"context_line":"        if isinstance(val, float):"},{"line_number":103,"context_line":"            return ValidationResult(False,"},{"line_number":104,"context_line":"                                    \"%(name)s is %(val)s which hasn\u0027t int type\""},{"line_number":105,"context_line":"                                    % {\"name\": param_name, \"val\": val})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_e2cad2a0","line":102,"updated":"2016-02-26 12:24:48.000000000","message":"I couldn\u0027t imagine how subclass of float could appear here","commit_id":"8714f73f274caaaf7c6ee5f06e34f1e2cbfbf894"}]}
