)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"872cb0c6e976820831e69cecb327e198788891bd","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Stephen Finucane \u003cstephenfin@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-08-07 15:06:25 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"compute: Add type hints for resize functions"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is split out of change I4760b01b695c94fa371b72216d398388cf981d28,"},{"line_number":10,"context_line":"which is intended as a backportable fix. The only unusual thing here is"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f560f44_06d99120","line":7,"updated":"2020-08-10 17:34:05.000000000","message":"Don\u0027t we need to add nova/compute/manager.py to mypy-files.txt in this change as well so the annotations get checked?","commit_id":"ccf296814e3123919c7eb8ed8165fe5d6336a42e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"119ca1a4f88238af7d2ac87d1b00d4f229497aa6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Stephen Finucane \u003cstephenfin@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-08-07 15:06:25 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"compute: Add type hints for resize functions"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is split out of change I4760b01b695c94fa371b72216d398388cf981d28,"},{"line_number":10,"context_line":"which is intended as a backportable fix. The only unusual thing here is"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f560f44_9ad7a950","line":7,"in_reply_to":"9f560f44_06d99120","updated":"2020-08-11 10:24:45.000000000","message":"I do, but there\u0027s more wrong with this file that needs to be fixed first. I would normally do that in a preceding patch, but I\u0027ve already got such a patch at [1] :)\n\n[1] https://review.opendev.org/#/c/742863/","commit_id":"ccf296814e3123919c7eb8ed8165fe5d6336a42e"}],"nova/compute/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"988d9d0c3572ce7bfa76f7fafa1aee20c932d824","unresolved":false,"context_lines":[{"line_number":4208,"context_line":"    def confirm_resize("},{"line_number":4209,"context_line":"        self,"},{"line_number":4210,"context_line":"        context: nova.context.RequestContext,"},{"line_number":4211,"context_line":"        instance: \u0027objects.Instance\u0027,"},{"line_number":4212,"context_line":"        migration: \u0027objects.Migration\u0027,"},{"line_number":4213,"context_line":"    ) -\u003e None:"},{"line_number":4214,"context_line":"        \"\"\"Confirms a migration/resize and deletes the \u0027old\u0027 instance."},{"line_number":4215,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_a670a573","line":4212,"range":{"start_line":4211,"start_character":8,"end_line":4212,"end_character":39},"updated":"2020-08-10 17:10:18.000000000","message":"How can these ever be verified when they come from RPC?\n\nI\u0027m sure nobody else agrees, but MHO is that this is less desirable than a docstring which provides the same amount of hint-age AFAICT.","commit_id":"ccf296814e3123919c7eb8ed8165fe5d6336a42e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"b98fd18e67588f68c272f538890ac4f44ad3a9c8","unresolved":false,"context_lines":[{"line_number":4208,"context_line":"    def confirm_resize("},{"line_number":4209,"context_line":"        self,"},{"line_number":4210,"context_line":"        context: nova.context.RequestContext,"},{"line_number":4211,"context_line":"        instance: \u0027objects.Instance\u0027,"},{"line_number":4212,"context_line":"        migration: \u0027objects.Migration\u0027,"},{"line_number":4213,"context_line":"    ) -\u003e None:"},{"line_number":4214,"context_line":"        \"\"\"Confirms a migration/resize and deletes the \u0027old\u0027 instance."},{"line_number":4215,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_80e57cdf","line":4212,"range":{"start_line":4211,"start_character":8,"end_line":4212,"end_character":39},"in_reply_to":"9f560f44_7af1f501","updated":"2020-08-11 13:42:27.000000000","message":"\u003e \u003e I\u0027m sure nobody else agrees, but MHO is that this is less\n \u003e desirable\n \u003e \u003e than a docstring which provides the same amount of hint-age\n \u003e AFAICT.\n \u003e \n \u003e One doesn\u0027t preclude the other. Docstrings make sense to describe\n \u003e the significance or use of the parameter, while annotations are\n \u003e great to describe, in a structured, machine readable format, the\n \u003e expected type. I have used these patches to improve upon docstrings\n \u003e too in the past, but I clearly haven\u0027t been consistent about it.\n \u003e Happy to rework this to add them here.\n\nDone","commit_id":"ccf296814e3123919c7eb8ed8165fe5d6336a42e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"119ca1a4f88238af7d2ac87d1b00d4f229497aa6","unresolved":false,"context_lines":[{"line_number":4208,"context_line":"    def confirm_resize("},{"line_number":4209,"context_line":"        self,"},{"line_number":4210,"context_line":"        context: nova.context.RequestContext,"},{"line_number":4211,"context_line":"        instance: \u0027objects.Instance\u0027,"},{"line_number":4212,"context_line":"        migration: \u0027objects.Migration\u0027,"},{"line_number":4213,"context_line":"    ) -\u003e None:"},{"line_number":4214,"context_line":"        \"\"\"Confirms a migration/resize and deletes the \u0027old\u0027 instance."},{"line_number":4215,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_7af1f501","line":4212,"range":{"start_line":4211,"start_character":8,"end_line":4212,"end_character":39},"in_reply_to":"9f560f44_a670a573","updated":"2020-08-11 10:24:45.000000000","message":"\u003e How can these ever be verified when they come from RPC?\n\nThey can\u0027t, and we\u0027re going to have to trust out RPC interfaces up to this point. From here on down though, it does propagate (or will, once I find a chunk of time to get type hints working for \u0027nova.objects\u0027 and o.vo as a whole). For example, consider:\n\n  def foo(var):\n      bar(var)\n\n  def bar(wow: str):\n      baz(wow)\n\n  def baz(woo: int):\n      print(woo)\n\nRunning this through mypy will yield the following:\n\n  $ mypy test.py\n  test.py:6: error: Argument 1 to \"baz\" has incompatible type \"str\"; expected \"int\"                                                                                                                                  \n  Found 1 error in 1 file (checked 1 source file)\n\n \u003e I\u0027m sure nobody else agrees, but MHO is that this is less desirable\n \u003e than a docstring which provides the same amount of hint-age AFAICT.\n\nOne doesn\u0027t preclude the other. Docstrings make sense to describe the significance or use of the parameter, while annotations are great to describe, in a structured, machine readable format, the expected type. I have used these patches to improve upon docstrings too in the past, but I clearly haven\u0027t been consistent about it. Happy to rework this to add them here.","commit_id":"ccf296814e3123919c7eb8ed8165fe5d6336a42e"}]}
