)]}'
{"CONTRIBUTING.rst":[{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"47c5ca51d7b5953dd6b28c6b61abf647008cba6b","unresolved":false,"context_lines":[{"line_number":195,"context_line":"  You can optionally define the following attribute:"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"  ``dependencies``"},{"line_number":198,"context_line":"      a list of entry point names of the hooks this hook depend on. These"},{"line_number":199,"context_line":"      hooks are expected to be enabled before the current hook."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"  Make your plugin a setuptools entry point under"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7ffa3b31_dde735e4","line":198,"range":{"start_line":198,"start_character":57,"end_line":198,"end_character":63},"updated":"2017-04-19 10:34:24.000000000","message":"nit: depends","commit_id":"4a94ceaef6691700c413fb26bf315f77fb12847c"}],"ironic_inspector/plugins/base.py":[{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"47c5ca51d7b5953dd6b28c6b61abf647008cba6b","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    \"\"\""},{"line_number":190,"context_line":"    try:"},{"line_number":191,"context_line":"        hooks \u003d [ext for ext in processing_hooks_manager()]"},{"line_number":192,"context_line":"    except KeyError as exc:"},{"line_number":193,"context_line":"        # callback function raises MissingHookError derived from KeyError"},{"line_number":194,"context_line":"        # on missing hook"},{"line_number":195,"context_line":"        raise RuntimeError(\u0027Hook(s) %s failed to load or was not found\u0027 % exc)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_9d040d4c","line":192,"range":{"start_line":192,"start_character":11,"end_line":192,"end_character":19},"updated":"2017-04-19 10:34:24.000000000","message":"... why not catch the stevedore.MissingHookError directly?","commit_id":"4a94ceaef6691700c413fb26bf315f77fb12847c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59ad66b58c35c4325790d1ca448fb90ca5936385","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    \"\"\""},{"line_number":190,"context_line":"    try:"},{"line_number":191,"context_line":"        hooks \u003d [ext for ext in processing_hooks_manager()]"},{"line_number":192,"context_line":"    except KeyError as exc:"},{"line_number":193,"context_line":"        # callback function raises MissingHookError derived from KeyError"},{"line_number":194,"context_line":"        # on missing hook"},{"line_number":195,"context_line":"        raise RuntimeError(\u0027Hook(s) %s failed to load or was not found\u0027 % exc)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_13ea2d0e","line":192,"range":{"start_line":192,"start_character":11,"end_line":192,"end_character":19},"in_reply_to":"7ffa3b31_9d040d4c","updated":"2017-04-26 16:57:54.000000000","message":"compatibility with old stevedore, I guess it can be dropped","commit_id":"4a94ceaef6691700c413fb26bf315f77fb12847c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"47c5ca51d7b5953dd6b28c6b61abf647008cba6b","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    except KeyError as exc:"},{"line_number":193,"context_line":"        # callback function raises MissingHookError derived from KeyError"},{"line_number":194,"context_line":"        # on missing hook"},{"line_number":195,"context_line":"        raise RuntimeError(\u0027Hook(s) %s failed to load or was not found\u0027 % exc)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    enabled \u003d set()"},{"line_number":198,"context_line":"    errors \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_3d729912","line":195,"range":{"start_line":195,"start_character":28,"end_line":195,"end_character":35},"updated":"2017-04-19 10:34:24.000000000","message":"nit: Some hooks failed to load or were not found (%s)?","commit_id":"4a94ceaef6691700c413fb26bf315f77fb12847c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59ad66b58c35c4325790d1ca448fb90ca5936385","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    except KeyError as exc:"},{"line_number":193,"context_line":"        # callback function raises MissingHookError derived from KeyError"},{"line_number":194,"context_line":"        # on missing hook"},{"line_number":195,"context_line":"        raise RuntimeError(\u0027Hook(s) %s failed to load or was not found\u0027 % exc)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    enabled \u003d set()"},{"line_number":198,"context_line":"    errors \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_d37e056a","line":195,"range":{"start_line":195,"start_character":28,"end_line":195,"end_character":35},"in_reply_to":"7ffa3b31_3d729912","updated":"2017-04-26 16:57:54.000000000","message":"%exc is actually a hook name in case of KeyError","commit_id":"4a94ceaef6691700c413fb26bf315f77fb12847c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"47c5ca51d7b5953dd6b28c6b61abf647008cba6b","unresolved":false,"context_lines":[{"line_number":198,"context_line":"    errors \u003d []"},{"line_number":199,"context_line":"    for hook in hooks:"},{"line_number":200,"context_line":"        deps \u003d getattr(hook.obj, \u0027dependencies\u0027, ())"},{"line_number":201,"context_line":"        missing \u003d [d for d in deps if d not in enabled]"},{"line_number":202,"context_line":"        if missing:"},{"line_number":203,"context_line":"            errors.append(\u0027Hook %(hook)s requires the following hooks to be \u0027"},{"line_number":204,"context_line":"                          \u0027enabled before it: %(deps)s. The following hooks \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_7dadc12f","line":201,"range":{"start_line":201,"start_character":18,"end_line":201,"end_character":55},"updated":"2017-04-19 10:34:24.000000000","message":"missing \u003d enabled - set(deps)? or is it to keep the ordering of deps intact in the error log?","commit_id":"4a94ceaef6691700c413fb26bf315f77fb12847c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59ad66b58c35c4325790d1ca448fb90ca5936385","unresolved":false,"context_lines":[{"line_number":198,"context_line":"    errors \u003d []"},{"line_number":199,"context_line":"    for hook in hooks:"},{"line_number":200,"context_line":"        deps \u003d getattr(hook.obj, \u0027dependencies\u0027, ())"},{"line_number":201,"context_line":"        missing \u003d [d for d in deps if d not in enabled]"},{"line_number":202,"context_line":"        if missing:"},{"line_number":203,"context_line":"            errors.append(\u0027Hook %(hook)s requires the following hooks to be \u0027"},{"line_number":204,"context_line":"                          \u0027enabled before it: %(deps)s. The following hooks \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_b3f6d9f8","line":201,"range":{"start_line":201,"start_character":18,"end_line":201,"end_character":55},"in_reply_to":"7ffa3b31_7dadc12f","updated":"2017-04-26 16:57:54.000000000","message":"yeah, I\u0027d prefer to keep the ordering","commit_id":"4a94ceaef6691700c413fb26bf315f77fb12847c"}],"ironic_inspector/test/unit/test_plugins_base.py":[{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"e4d70173ae391f3d31195ccf862336c659151f00","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.assertEqual(mock_mgr.return_value, hooks)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def test_broken_dependencies(self, mock_mgr):"},{"line_number":67,"context_line":"        mock_mgr.return_value \u003d ["},{"line_number":68,"context_line":"            fake_ext(name\u003d\u00272\u0027, obj\u003dmock.Mock(dependencies\u003d[\u00271\u0027])),"},{"line_number":69,"context_line":"            fake_ext(name\u003d\u00273\u0027, obj\u003dmock.Mock(dependencies\u003d[\u00272\u0027, \u00271\u0027])),"},{"line_number":70,"context_line":"        ]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.assertRaisesRegex(RuntimeError, \"missing: 1\","},{"line_number":73,"context_line":"                               base.validate_processing_hooks)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_3c02510b","line":70,"range":{"start_line":67,"start_character":0,"end_line":70,"end_character":9},"updated":"2017-04-11 14:20:15.000000000","message":"nit: one more case:\n\n fake_ext(name\u003d\u00272\u0027, obj\u003dmock.Mock(dependencies\u003d[\u00271\u0027])),\n fake_ext(name\u003d\u00273\u0027, obj\u003dmock.Mock(dependencies\u003d[\u00272\u0027, \u00271\u0027])),\n fake_ext(name\u003d\u00271\u0027, obj\u003dmock.Mock(dependencies\u003d[])),","commit_id":"9606f2ddb7aa1408af26911ad755d2cf167b0cdb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ae77d1c9e8c5e1db7e8669ab0b3f287a554ea8c9","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.assertEqual(mock_mgr.return_value, hooks)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def test_broken_dependencies(self, mock_mgr):"},{"line_number":67,"context_line":"        mock_mgr.return_value \u003d ["},{"line_number":68,"context_line":"            fake_ext(name\u003d\u00272\u0027, obj\u003dmock.Mock(dependencies\u003d[\u00271\u0027])),"},{"line_number":69,"context_line":"            fake_ext(name\u003d\u00273\u0027, obj\u003dmock.Mock(dependencies\u003d[\u00272\u0027, \u00271\u0027])),"},{"line_number":70,"context_line":"        ]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.assertRaisesRegex(RuntimeError, \"missing: 1\","},{"line_number":73,"context_line":"                               base.validate_processing_hooks)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_fcf18902","line":70,"range":{"start_line":67,"start_character":0,"end_line":70,"end_character":9},"in_reply_to":"bff0334d_3c02510b","updated":"2017-04-11 14:21:29.000000000","message":"Oh, this is a good case to test, will update.","commit_id":"9606f2ddb7aa1408af26911ad755d2cf167b0cdb"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"47c5ca51d7b5953dd6b28c6b61abf647008cba6b","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        ]"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        hooks \u003d base.validate_processing_hooks()"},{"line_number":64,"context_line":"        self.assertEqual(mock_mgr.return_value, hooks)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def test_broken_dependencies(self, mock_mgr):"},{"line_number":67,"context_line":"        mock_mgr.return_value \u003d ["}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_6f6f4492","line":64,"updated":"2017-04-19 10:34:24.000000000","message":"Nit(ish): I\u0027d assert mock_mgr was called","commit_id":"4a94ceaef6691700c413fb26bf315f77fb12847c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"47c5ca51d7b5953dd6b28c6b61abf647008cba6b","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            fake_ext(name\u003d\u00273\u0027, obj\u003dmock.Mock(dependencies\u003d[\u00272\u0027, \u00271\u0027])),"},{"line_number":70,"context_line":"        ]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.assertRaisesRegex(RuntimeError, \"missing: 1\","},{"line_number":73,"context_line":"                               base.validate_processing_hooks)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_wrong_dependencies_order(self, mock_mgr):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_8fe73013","line":72,"range":{"start_line":72,"start_character":13,"end_line":72,"end_character":30},"updated":"2017-04-19 10:34:24.000000000","message":"shouldn\u0027t this be rather six.assertRaisesRegex(self, ....)?","commit_id":"4a94ceaef6691700c413fb26bf315f77fb12847c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"6d4139e257a857b5ab98c0b9e3d8a46e4bbd0be2","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            fake_ext(name\u003d\u00273\u0027, obj\u003dmock.Mock(dependencies\u003d[\u00272\u0027, \u00271\u0027])),"},{"line_number":70,"context_line":"        ]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.assertRaisesRegex(RuntimeError, \"missing: 1\","},{"line_number":73,"context_line":"                               base.validate_processing_hooks)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_wrong_dependencies_order(self, mock_mgr):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_6ff730d5","line":72,"range":{"start_line":72,"start_character":13,"end_line":72,"end_character":30},"in_reply_to":"5ff73747_33e2c930","updated":"2017-04-27 07:01:19.000000000","message":"ah, never mind me, this didn\u0027t work before (python2 unittest had self.assertRaisesRegexp which was deprecated in python3).","commit_id":"4a94ceaef6691700c413fb26bf315f77fb12847c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"59ad66b58c35c4325790d1ca448fb90ca5936385","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            fake_ext(name\u003d\u00273\u0027, obj\u003dmock.Mock(dependencies\u003d[\u00272\u0027, \u00271\u0027])),"},{"line_number":70,"context_line":"        ]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.assertRaisesRegex(RuntimeError, \"missing: 1\","},{"line_number":73,"context_line":"                               base.validate_processing_hooks)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_wrong_dependencies_order(self, mock_mgr):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_33e2c930","line":72,"range":{"start_line":72,"start_character":13,"end_line":72,"end_character":30},"in_reply_to":"7ffa3b31_8fe73013","updated":"2017-04-26 16:57:54.000000000","message":"Why? I\u0027d rather avoid using six if we have a clean standard version","commit_id":"4a94ceaef6691700c413fb26bf315f77fb12847c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"47c5ca51d7b5953dd6b28c6b61abf647008cba6b","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        self.assertRaisesRegex(RuntimeError, \"missing: 1\","},{"line_number":83,"context_line":"                               base.validate_processing_hooks)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def test_missing_hooks(self, mock_mgr):"},{"line_number":86,"context_line":"        mock_mgr.side_effect \u003d KeyError(\u0027foo\u0027)"},{"line_number":87,"context_line":"        self.assertRaisesRegex(RuntimeError, \"\u0027foo\u0027 failed to load\","}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_6f23c406","line":84,"updated":"2017-04-19 10:34:24.000000000","message":"not sure what we expect here but self-dependency should fail I guess too; check explicitly?\n\n    mock_mgr.return_value \u003d [\n        fake_ext(name\u003d\u00271\u0027, obj\u003dmock.Mock(dependencies\u003d[\u00271\u0027])) \n    ]\n\n   self.assertRaisesRegex(RuntimeError, \"missing: 1\",\n                               base.validate_processing_hooks)","commit_id":"4a94ceaef6691700c413fb26bf315f77fb12847c"}]}
