)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"8c06038e76d1843235391649b0f8a02cce2e8bc1","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove useless strip code and add unit tests on the sphinxext indent function"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The if/else condition in the yield always return True"},{"line_number":10,"context_line":"no matter the input text so we don\u0027t strip anything at all."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Do we need to always strip spaces? I suppose yes but"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_3f5a4982","line":9,"updated":"2019-07-19 16:44:12.000000000","message":"I\u0027m pretty sure this isn\u0027t true. If you pass a string with an empty line to splitlines and then strip it you get something that evaluates as False, at least in my local testing.\n\nFor example:\n\nfoo \u003d \"\"\"test\ntesting\n\nafter blank\n\"\"\"\n\nfor line in foo.splitlines(True):\n    print(\u0027--\u0027 + line if line.strip() else line, end\u003d\u0027\u0027)\n[bnemec@Carbon scripts]$ python3 ./test.py \n--test\n--testing\n\n--after blank\n\nYou can see it correctly did not prepend the indentation string to the empty line. That\u0027s the behavior we\u0027re looking for here.\n\nIf I remove the if statement then it results in:\n\n--test\n--testing\n--\n--after blank\n\nWhich is wrong.","commit_id":"0995db590fd72324dc3baa674ab53068ecb8a669"}],"oslo_policy/tests/test_sphinxext.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"8c06038e76d1843235391649b0f8a02cce2e8bc1","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        self.assertEqual(\"    foo\\n    bar\", result)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"        result \u003d sphinxext._indent(\"\")"},{"line_number":30,"context_line":"        self.assertEqual(\"\", result)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"        result \u003d sphinxext._indent(\"\\tfoo\\nbar\")"},{"line_number":33,"context_line":"        self.assertEqual(\"    \\tfoo\\n    bar\", result)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_4a074119","line":30,"updated":"2019-07-19 16:44:12.000000000","message":"Because there\u0027s no newline in this string, splitlines returns an empty list so it\u0027s essentially a noop. That\u0027s why this works even though my example in the commit message doesn\u0027t.","commit_id":"0995db590fd72324dc3baa674ab53068ecb8a669"}]}
