)]}'
{"HACKING.rst":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"fbfbbdf592ff1297a6cd33c45c6954f4073b6112","unresolved":false,"context_lines":[{"line_number":14,"context_line":"- [N324] Enforce no use of LOG.audit messages.  LOG.info should be used instead."},{"line_number":15,"context_line":"- [N327] assert_called_once is not a valid Mock method."},{"line_number":16,"context_line":"- [N333] Ensure that oslo namespaces are used for namespaced libraries."},{"line_number":17,"context_line":"- [N335] timeutils.utcnow() from oslo_utils should be used instead of datetime.now()."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"General"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9a80dd14_40968695","line":17,"updated":"2015-03-12 14:09:00.000000000","message":"This was just pointing out to me in another patch, but the N number of these is actually based on checks from Nova:\n\nhttps://github.com/openstack/nova/blob/master/HACKING.rst\n\nThis number conflicts with a different check in Nova. I\u0027m not sure if it\u0027s better to get this added to Nova so we have matching numbers, or if it\u0027s possible to do something like C335 for something Cinder specific. Check with jungleboyj on IRC for recommendations on how to proceed.","commit_id":"57168314ddd0c9d6d274f72ca224c3e1968551a3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"bdb0aa7ecff989a7bcd177cbd610e46ad0a3abcd","unresolved":false,"context_lines":[{"line_number":14,"context_line":"- [N324] Enforce no use of LOG.audit messages.  LOG.info should be used instead."},{"line_number":15,"context_line":"- [N327] assert_called_once is not a valid Mock method."},{"line_number":16,"context_line":"- [N333] Ensure that oslo namespaces are used for namespaced libraries."},{"line_number":17,"context_line":"- [N335] timeutils.utcnow() from oslo_utils should be used instead of datetime.now()."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"General"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9a80dd14_ab29d68a","line":17,"in_reply_to":"9a80dd14_40968695","updated":"2015-03-12 19:02:53.000000000","message":"Wow, I never put the NXXX together as meaning they were from Nova.  Ooops.  Then again, I pulled most of these from Nova, so that would be why they are like that.  :-)\n\nSo, I propose that timeutils.utcnow() check become C301.\n\nNow I know I have other clean-up to do in here.  I will work on that.\n\nThanks Sean!","commit_id":"57168314ddd0c9d6d274f72ca224c3e1968551a3"}],"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"c92f9e33dcde25890c67e769f44ac20b7d9bb195","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"\"\"\"Implementation of SQLAlchemy backend.\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import datetime as dt"},{"line_number":23,"context_line":"import functools"},{"line_number":24,"context_line":"import sys"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_8dc230e7","line":21,"updated":"2015-03-03 18:48:07.000000000","message":"Was thinking this would/should go away altogether, but it seems timeutils doesn\u0027t have a delta/days method :(","commit_id":"3941c1d5e2cbf50e65b8356268fdfd1ddd6ed772"}],"cinder/hacking/checks.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"b6f6703ce87f36e193d624dd5b2cb4975aa55297","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"def check_datetime_now(logical_line):"},{"line_number":141,"context_line":"    if re.match(\u0027datetime.now\u0027, logical_line):"},{"line_number":142,"context_line":"        yield(0, \"Found datetime.now(). Please use datetime.utcnow().\")"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"def factory(register):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_50a83977","line":142,"updated":"2015-02-28 12:28:54.000000000","message":"Please pick a new higher N# for this.","commit_id":"8cb171a5639124d78c1672101816d0101d810d80"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"df6c5f856aa2f0a24ebb0e07d34a6f6fd22d700f","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"def check_datetime_now(logical_line):"},{"line_number":141,"context_line":"    if re.match(\u0027datetime.now\u0027, logical_line):"},{"line_number":142,"context_line":"        yield(0, \"N335: Found datetime.now(). Please use datetime.utcnow().\")"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_c14d1a74","line":141,"updated":"2015-03-02 15:01:11.000000000","message":"I\u0027m not sure if re.match() is what you actually want to use here. From the documentation, match will only match it if the string is at the beginning of the line. You probably either want to use re.search, or just something like:\n\nif \u0027datetime.now\u0027 in logical_line:","commit_id":"c025172d004c985b18c538dc50d4679d483f26d7"}]}
