)]}'
{"placement/objects/resource_provider.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"ef24dd4f6379fce8d46418e857250b897669369d","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        ).where(sa.and_("},{"line_number":284,"context_line":"            _ALLOC_TBL.c.resource_provider_id \u003d\u003d rp.id,"},{"line_number":285,"context_line":"            _ALLOC_TBL.c.resource_class_id \u003d\u003d rc_id)"},{"line_number":286,"context_line":"        )"},{"line_number":287,"context_line":"        allocations \u003d ctx.session.execute(allocation_query).first()"},{"line_number":288,"context_line":"        if (allocations and"},{"line_number":289,"context_line":"                allocations[\u0027usage\u0027] is not None and"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_0352b43b","line":286,"updated":"2019-03-15 12:54:54.000000000","message":"Ugh, please no!\n\nIndent all the lines one level so that they read as part of the same line:\n\n    return context.session.query(\n            models.ResourceProvider\n        ).filter(\n            models.ResourceProvider.id \u003d\u003d _id\n        ).delete(\n            synchronize_session\u003dFalse)","commit_id":"f35d60594edca82c224600c093188c6bd43f6891"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f0657127331b568a7d9148ad01a64047cae82d15","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        ).where(sa.and_("},{"line_number":284,"context_line":"            _ALLOC_TBL.c.resource_provider_id \u003d\u003d rp.id,"},{"line_number":285,"context_line":"            _ALLOC_TBL.c.resource_class_id \u003d\u003d rc_id)"},{"line_number":286,"context_line":"        )"},{"line_number":287,"context_line":"        allocations \u003d ctx.session.execute(allocation_query).first()"},{"line_number":288,"context_line":"        if (allocations and"},{"line_number":289,"context_line":"                allocations[\u0027usage\u0027] is not None and"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_a682cefe","line":286,"in_reply_to":"5fc1f717_0352b43b","updated":"2019-03-15 13:23:10.000000000","message":"While I agree that\u0027s more visually pleasing, it violates some peps:\n\n placement/objects/resource_provider.py:282:17: E126 continuation line over-indented for hanging indent\n placement/objects/resource_provider.py:283:13: E121 continuation line under-indented for hanging indent\n placement/objects/resource_provider.py:286:13: E123 closing bracket does not match indentation of opening bracket\u0027s line\n\n...which is why this is awkward.","commit_id":"f35d60594edca82c224600c093188c6bd43f6891"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"aa7570e20affb42d43d8910a22ef1abb894b4720","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        ).where(sa.and_("},{"line_number":284,"context_line":"            _ALLOC_TBL.c.resource_provider_id \u003d\u003d rp.id,"},{"line_number":285,"context_line":"            _ALLOC_TBL.c.resource_class_id \u003d\u003d rc_id)"},{"line_number":286,"context_line":"        )"},{"line_number":287,"context_line":"        allocations \u003d ctx.session.execute(allocation_query).first()"},{"line_number":288,"context_line":"        if (allocations and"},{"line_number":289,"context_line":"                allocations[\u0027usage\u0027] is not None and"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_654e1339","line":286,"in_reply_to":"5fc1f717_229b2118","updated":"2019-03-15 20:55:27.000000000","message":"And since the motivation for doing this is to remove \"ickiness\", it would seem like a step back to decrease readability, which I find much ickier.","commit_id":"f35d60594edca82c224600c093188c6bd43f6891"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"33bee322a5e968487f2bf7c628e42358dabc39af","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        ).where(sa.and_("},{"line_number":284,"context_line":"            _ALLOC_TBL.c.resource_provider_id \u003d\u003d rp.id,"},{"line_number":285,"context_line":"            _ALLOC_TBL.c.resource_class_id \u003d\u003d rc_id)"},{"line_number":286,"context_line":"        )"},{"line_number":287,"context_line":"        allocations \u003d ctx.session.execute(allocation_query).first()"},{"line_number":288,"context_line":"        if (allocations and"},{"line_number":289,"context_line":"                allocations[\u0027usage\u0027] is not None and"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_229b2118","line":286,"in_reply_to":"5fc1f717_a682cefe","updated":"2019-03-15 20:52:53.000000000","message":"Well, that\u0027s one of the parts of PEP8 that I feel hurts readability, and would prefer not to enforce blindly: https://www.python.org/dev/peps/pep-0008/#id15\n\nBarring that, it could be re-written as several lines with no impact to performance and avoid the run-on style of sa code.","commit_id":"f35d60594edca82c224600c093188c6bd43f6891"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"ef24dd4f6379fce8d46418e857250b897669369d","unresolved":false,"context_lines":[{"line_number":942,"context_line":""},{"line_number":943,"context_line":"@db_api.placement_context_manager.writer"},{"line_number":944,"context_line":"def _delete_rp_record(context, _id):"},{"line_number":945,"context_line":"    return context.session.query("},{"line_number":946,"context_line":"        models.ResourceProvider"},{"line_number":947,"context_line":"    ).filter("},{"line_number":948,"context_line":"        models.ResourceProvider.id \u003d\u003d _id"},{"line_number":949,"context_line":"    ).delete("},{"line_number":950,"context_line":"        synchronize_session\u003dFalse)"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":""},{"line_number":953,"context_line":"class ResourceProvider(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_036954f7","line":950,"range":{"start_line":945,"start_character":0,"end_line":950,"end_character":34},"updated":"2019-03-15 12:54:54.000000000","message":"same","commit_id":"f35d60594edca82c224600c093188c6bd43f6891"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"ef24dd4f6379fce8d46418e857250b897669369d","unresolved":false,"context_lines":[{"line_number":1163,"context_line":"            models.Inventory.resource_provider_id \u003d\u003d _id"},{"line_number":1164,"context_line":"        ).delete("},{"line_number":1165,"context_line":"            synchronize_session\u003dFalse"},{"line_number":1166,"context_line":"        )"},{"line_number":1167,"context_line":"        # Delete any aggregate associations for the resource provider"},{"line_number":1168,"context_line":"        # The name substitution on the next line is needed to satisfy pep8"},{"line_number":1169,"context_line":"        RPA_model \u003d models.ResourceProviderAggregate"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_c36eecfe","line":1166,"updated":"2019-03-15 12:54:54.000000000","message":"same","commit_id":"f35d60594edca82c224600c093188c6bd43f6891"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"ef24dd4f6379fce8d46418e857250b897669369d","unresolved":false,"context_lines":[{"line_number":1181,"context_line":"            models.ResourceProvider.root_provider_id \u003d\u003d _id"},{"line_number":1182,"context_line":"        ).update("},{"line_number":1183,"context_line":"            {\u0027root_provider_id\u0027: None}"},{"line_number":1184,"context_line":"        )"},{"line_number":1185,"context_line":"        # Now delete the RP record"},{"line_number":1186,"context_line":"        try:"},{"line_number":1187,"context_line":"            result \u003d _delete_rp_record(context, _id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_637938c6","line":1184,"updated":"2019-03-15 12:54:54.000000000","message":"same","commit_id":"f35d60594edca82c224600c093188c6bd43f6891"}],"placement/tests/functional/db/test_resource_provider.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"ef24dd4f6379fce8d46418e857250b897669369d","unresolved":false,"context_lines":[{"line_number":506,"context_line":"                rp \u003d context.session.query("},{"line_number":507,"context_line":"                    models.ResourceProvider"},{"line_number":508,"context_line":"                ).filter("},{"line_number":509,"context_line":"                    models.ResourceProvider.id \u003d\u003d _id"},{"line_number":510,"context_line":"                ).first()"},{"line_number":511,"context_line":"                self.assertIsNone(rp.root_provider_id)"},{"line_number":512,"context_line":"                return func(context, _id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_c347cc76","line":509,"updated":"2019-03-15 12:54:54.000000000","message":"same comment about indentation as in p/o/resource_provider.py","commit_id":"f35d60594edca82c224600c093188c6bd43f6891"}]}
