)]}'
{"cinder/hacking/checks.py":[{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"d633aeb5c5c6bcae3b3609223e0eee171a11a3c5","unresolved":false,"context_lines":[{"line_number":70,"context_line":"assert_True \u003d re.compile("},{"line_number":71,"context_line":"    r\".*assertEqual\\(True, .*\\)\")"},{"line_number":72,"context_line":"import_logging \u003d re.compile("},{"line_number":73,"context_line":"    r\".*import logging$\")"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"class BaseASTChecker(ast.NodeVisitor):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_5d171ca3","line":73,"updated":"2016-03-08 06:25:15.000000000","message":"Should we check following regex?\nimport_logging \u003d re.compile(\n    r\"^import logging.*\")\n\nSo that we can prevent such cases:\n\nimport logging\nimport logging as ..\n\nAnd I find more files using logging.\n\n\n./cinder/tests/fixtures.py:19:1: C314  You should use oslo.log rather than logging\n./cinder/cmd/api.py:23:1: C314  You should use oslo.log rather than logging\n./cinder/cmd/backup.py:20:1: C314  You should use oslo.log rather than logging\n./cinder/cmd/scheduler.py:23:1: C314  You should use oslo.log rather than logging\n./cinder/cmd/volume.py:20:1: C314  You should use oslo.log rather than logging\n\n\nIn such case, \n\nimport logging as python_logging","commit_id":"827b549a25b0adb6f3fd500463b9cdf511c134c1"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2ad2a8757a07cf26a6c96a830b0b8ba65f7b452a","unresolved":false,"context_lines":[{"line_number":70,"context_line":"assert_True \u003d re.compile("},{"line_number":71,"context_line":"    r\".*assertEqual\\(True, .*\\)\")"},{"line_number":72,"context_line":"import_logging \u003d re.compile("},{"line_number":73,"context_line":"    r\".*import logging$\")"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"class BaseASTChecker(ast.NodeVisitor):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_92669c27","line":73,"in_reply_to":"5aef4532_5d171ca3","updated":"2016-03-08 15:24:10.000000000","message":"I agree with the idea of improving the regex, but I would go with:\n\n r\"^(import|from) logging[\\. ].*\"","commit_id":"827b549a25b0adb6f3fd500463b9cdf511c134c1"}]}
