)]}'
{"mistral/hacking/checks.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"d4351f5a206a8684dbf7b92d2abcced99790ae91","unresolved":false,"context_lines":[{"line_number":19,"context_line":"oslo_namespace_imports_from_dot \u003d re.compile(r\"from[\\s]+oslo[.]\")"},{"line_number":20,"context_line":"oslo_namespace_imports_from_root \u003d re.compile(r\"from[\\s]+oslo[\\s]+import[\\s]+\")"},{"line_number":21,"context_line":"asse_equal_order_re \u003d re.compile("},{"line_number":22,"context_line":"    r\"(.)*assertEqual\\(.*?, (?:[0-9]+|[\u0027\\\"].*[\u0027\\\"])\\)$\")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_oslo_namespace_imports(logical_line):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_fad8ca54","line":22,"updated":"2015-10-01 10:10:44.000000000","message":"Are you sure this regexp covers all needed cases? Is it a standard pattern for this?\n\nFor example, how would it process the situation:\nvar expected \u003d ...\nvar actual \u003d ...\n\nself.assertEqual(expected, actual)\n\n\u0027actual\u0027 doesn\u0027t contain anything that tells about literal (no quotes, apostrophes etc.)","commit_id":"deab406a60d3987f64ed1dca7419a33b9677fe68"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"8b5ea70ffbcb0b4c4c483bfc8e3038e579a71268","unresolved":false,"context_lines":[{"line_number":19,"context_line":"oslo_namespace_imports_from_dot \u003d re.compile(r\"from[\\s]+oslo[.]\")"},{"line_number":20,"context_line":"oslo_namespace_imports_from_root \u003d re.compile(r\"from[\\s]+oslo[\\s]+import[\\s]+\")"},{"line_number":21,"context_line":"asse_equal_order_re \u003d re.compile("},{"line_number":22,"context_line":"    r\"(.)*assertEqual\\(.*?, (?:[0-9]+|[\u0027\\\"].*[\u0027\\\"])\\)$\")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_oslo_namespace_imports(logical_line):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_7dbc8f6c","line":22,"in_reply_to":"9a1a9d01_2ae3eb34","updated":"2015-10-06 07:51:34.000000000","message":"I agree with you in general but I cannot accept this patch. The reason: this regexp is really difficult to design properly and its current version doesn\u0027t cover some obviously valid cases as assertEqual(actual, expected).\n\nIMO, forcing people to always use \"expected\" as a variable name is a bad idea. There may be tons of cases when it is not convenient. Say if there multiple expected values. And this is another thing that people just have to remember which is, IMO, absolutely redundant information.","commit_id":"deab406a60d3987f64ed1dca7419a33b9677fe68"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"fa57ed711f214804de945c514f3273aec427f52b","unresolved":false,"context_lines":[{"line_number":19,"context_line":"oslo_namespace_imports_from_dot \u003d re.compile(r\"from[\\s]+oslo[.]\")"},{"line_number":20,"context_line":"oslo_namespace_imports_from_root \u003d re.compile(r\"from[\\s]+oslo[\\s]+import[\\s]+\")"},{"line_number":21,"context_line":"asse_equal_order_re \u003d re.compile("},{"line_number":22,"context_line":"    r\"(.)*assertEqual\\(.*?, (?:[0-9]+|[\u0027\\\"].*[\u0027\\\"])\\)$\")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_oslo_namespace_imports(logical_line):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_5ae69117","line":22,"in_reply_to":"9a1a9d01_35009501","updated":"2015-10-01 12:16:36.000000000","message":"How is it done in nova, for example?","commit_id":"deab406a60d3987f64ed1dca7419a33b9677fe68"},{"author":{"_account_id":18238,"name":"Hardik Parekh","email":"hardik.parekh047@gmail.com","username":"hparekh"},"change_message_id":"cc11c4d533a760dc2e5a4d3b0694d5e32be90fa2","unresolved":false,"context_lines":[{"line_number":19,"context_line":"oslo_namespace_imports_from_dot \u003d re.compile(r\"from[\\s]+oslo[.]\")"},{"line_number":20,"context_line":"oslo_namespace_imports_from_root \u003d re.compile(r\"from[\\s]+oslo[\\s]+import[\\s]+\")"},{"line_number":21,"context_line":"asse_equal_order_re \u003d re.compile("},{"line_number":22,"context_line":"    r\"(.)*assertEqual\\(.*?, (?:[0-9]+|[\u0027\\\"].*[\u0027\\\"])\\)$\")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_oslo_namespace_imports(logical_line):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_35009501","line":22,"in_reply_to":"9a1a9d01_55a669ae","updated":"2015-10-01 10:57:32.000000000","message":"Hmm.. i think such situation is hard to find if variable is used instead of constant value.\n\nTo handle such situation i would like to suggest following solution.\n\nWe should force user to use variable name %expected%.\ne.g. If the first argument is not constant in assertEqual() then it should be %expected% variable name.","commit_id":"deab406a60d3987f64ed1dca7419a33b9677fe68"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"b695079cc7529a336c7f32d0945f1d14dadaf874","unresolved":false,"context_lines":[{"line_number":19,"context_line":"oslo_namespace_imports_from_dot \u003d re.compile(r\"from[\\s]+oslo[.]\")"},{"line_number":20,"context_line":"oslo_namespace_imports_from_root \u003d re.compile(r\"from[\\s]+oslo[\\s]+import[\\s]+\")"},{"line_number":21,"context_line":"asse_equal_order_re \u003d re.compile("},{"line_number":22,"context_line":"    r\"(.)*assertEqual\\(.*?, (?:[0-9]+|[\u0027\\\"].*[\u0027\\\"])\\)$\")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_oslo_namespace_imports(logical_line):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_8f5a4982","line":22,"in_reply_to":"9a1a9d01_5a5d3147","updated":"2015-10-05 06:55:08.000000000","message":"And it has -1 from Matthew Treinish who I completely agree with (look at his comment). So for now I vote -1.","commit_id":"deab406a60d3987f64ed1dca7419a33b9677fe68"},{"author":{"_account_id":18238,"name":"Hardik Parekh","email":"hardik.parekh047@gmail.com","username":"hparekh"},"change_message_id":"ba8bd23fe948723ae9936295ff2fb0ef66c2471d","unresolved":false,"context_lines":[{"line_number":19,"context_line":"oslo_namespace_imports_from_dot \u003d re.compile(r\"from[\\s]+oslo[.]\")"},{"line_number":20,"context_line":"oslo_namespace_imports_from_root \u003d re.compile(r\"from[\\s]+oslo[\\s]+import[\\s]+\")"},{"line_number":21,"context_line":"asse_equal_order_re \u003d re.compile("},{"line_number":22,"context_line":"    r\"(.)*assertEqual\\(.*?, (?:[0-9]+|[\u0027\\\"].*[\u0027\\\"])\\)$\")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_oslo_namespace_imports(logical_line):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_5a5d3147","line":22,"in_reply_to":"9a1a9d01_5ae69117","updated":"2015-10-01 12:27:31.000000000","message":"Nova https://review.openstack.org/#/c/227650/","commit_id":"deab406a60d3987f64ed1dca7419a33b9677fe68"},{"author":{"_account_id":18238,"name":"Hardik Parekh","email":"hardik.parekh047@gmail.com","username":"hparekh"},"change_message_id":"ef27afe278a492564724523e1f475102ec538254","unresolved":false,"context_lines":[{"line_number":19,"context_line":"oslo_namespace_imports_from_dot \u003d re.compile(r\"from[\\s]+oslo[.]\")"},{"line_number":20,"context_line":"oslo_namespace_imports_from_root \u003d re.compile(r\"from[\\s]+oslo[\\s]+import[\\s]+\")"},{"line_number":21,"context_line":"asse_equal_order_re \u003d re.compile("},{"line_number":22,"context_line":"    r\"(.)*assertEqual\\(.*?, (?:[0-9]+|[\u0027\\\"].*[\u0027\\\"])\\)$\")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_oslo_namespace_imports(logical_line):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_2ae3eb34","line":22,"in_reply_to":"9a1a9d01_8f5a4982","updated":"2015-10-05 07:29:05.000000000","message":"Yes I understand.\n\nBut there are lots of patches for assertEquals order in other components also.\n\nTo work on such kind of patches is completely waste of time and it will not be useful in improvement or development of the component.\n\nSo this pep8 check will reduce such kind of patches and we can actually focus on development  and improvement of the component.","commit_id":"deab406a60d3987f64ed1dca7419a33b9677fe68"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"50b13a195a1e1fa0c6ca6d033486764e901747c6","unresolved":false,"context_lines":[{"line_number":19,"context_line":"oslo_namespace_imports_from_dot \u003d re.compile(r\"from[\\s]+oslo[.]\")"},{"line_number":20,"context_line":"oslo_namespace_imports_from_root \u003d re.compile(r\"from[\\s]+oslo[\\s]+import[\\s]+\")"},{"line_number":21,"context_line":"asse_equal_order_re \u003d re.compile("},{"line_number":22,"context_line":"    r\"(.)*assertEqual\\(.*?, (?:[0-9]+|[\u0027\\\"].*[\u0027\\\"])\\)$\")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_oslo_namespace_imports(logical_line):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_55a669ae","line":22,"in_reply_to":"9a1a9d01_ba45726f","updated":"2015-10-01 10:41:37.000000000","message":"Yes, Nikolay expressed my thought more clearly ) Thanks.","commit_id":"deab406a60d3987f64ed1dca7419a33b9677fe68"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"44fbcabe061fe8ba93bbaa23d70a7c965f03fed9","unresolved":false,"context_lines":[{"line_number":19,"context_line":"oslo_namespace_imports_from_dot \u003d re.compile(r\"from[\\s]+oslo[.]\")"},{"line_number":20,"context_line":"oslo_namespace_imports_from_root \u003d re.compile(r\"from[\\s]+oslo[\\s]+import[\\s]+\")"},{"line_number":21,"context_line":"asse_equal_order_re \u003d re.compile("},{"line_number":22,"context_line":"    r\"(.)*assertEqual\\(.*?, (?:[0-9]+|[\u0027\\\"].*[\u0027\\\"])\\)$\")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_oslo_namespace_imports(logical_line):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_ba45726f","line":22,"in_reply_to":"9a1a9d01_fad8ca54","updated":"2015-10-01 10:21:10.000000000","message":"Hmm. I suggest proposing other situation: \n\n  self.assertEqual(actual, expected)\n\nAnd this situation have no difference with mentioned by Renat from regexp perspective? How to deal with that?","commit_id":"deab406a60d3987f64ed1dca7419a33b9677fe68"}]}
