)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a5d8c88e4e1977a6650008136e5561de0d8c0540","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"123efaba_708f4964","updated":"2024-11-15 16:55:19.000000000","message":"I\u0027m going to be a bit more optimistic than Rajat, but I won\u0027t be upset if other reviewers think it\u0027s too soon to merge this change.","commit_id":"51ac827372ee18875e07253f9c24bcd357b18da8"}],"cinder/image/cache.py":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"171c394b34937360d643273893a6abae4eec0f48","unresolved":true,"context_lines":[{"line_number":38,"context_line":"                 clone_across_pools: bool \u003d False):"},{"line_number":39,"context_line":"        self.db \u003d db"},{"line_number":40,"context_line":"        self.volume_api \u003d volume_api"},{"line_number":41,"context_line":"        self.max_cache_size_gb \u003d max_cache_size_gb"},{"line_number":42,"context_line":"        self.max_cache_size_count \u003d max_cache_size_count"},{"line_number":43,"context_line":"        self.clone_across_pools \u003d clone_across_pools"},{"line_number":44,"context_line":"        self.notifier \u003d rpc.get_notifier(\u0027volume\u0027, CONF.host)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def get_by_image_volume(self,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4b1361_789caede","line":43,"range":{"start_line":41,"start_character":8,"end_line":43,"end_character":52},"updated":"2024-11-15 10:07:55.000000000","message":"Ideally any caller passing wrong type values to this should fail mypy check but mypy is also a static type checker\n\n    def test_annotate(a: int\u003d0):\n       print(a)\n\n    test_annotate(5.5)\n    \nThis code works fine\n\n$ python3 test_annotations.py \n5.5\n\nBut fails the mypy check\n\n$ mypy test_annotations.py \ntest_annotations.py:4: error: Argument 1 to \"test_annotate\" has incompatible type \"float\"; expected \"int\"  [arg-type]\nFound 1 error in 1 file (checked 1 source file)\n\nSo I\u0027m unsure about the change (as the type conversion is minimal and keeps us on the safer side)","commit_id":"51ac827372ee18875e07253f9c24bcd357b18da8"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a5d8c88e4e1977a6650008136e5561de0d8c0540","unresolved":true,"context_lines":[{"line_number":38,"context_line":"                 clone_across_pools: bool \u003d False):"},{"line_number":39,"context_line":"        self.db \u003d db"},{"line_number":40,"context_line":"        self.volume_api \u003d volume_api"},{"line_number":41,"context_line":"        self.max_cache_size_gb \u003d max_cache_size_gb"},{"line_number":42,"context_line":"        self.max_cache_size_count \u003d max_cache_size_count"},{"line_number":43,"context_line":"        self.clone_across_pools \u003d clone_across_pools"},{"line_number":44,"context_line":"        self.notifier \u003d rpc.get_notifier(\u0027volume\u0027, CONF.host)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def get_by_image_volume(self,"}],"source_content_type":"text/x-python","patch_set":2,"id":"f2f73424_164c84b8","line":43,"range":{"start_line":41,"start_character":8,"end_line":43,"end_character":52},"in_reply_to":"3f4b1361_789caede","updated":"2024-11-15 16:55:19.000000000","message":"You make a good point, Rajat, because even though we have a voting mypy job, we don\u0027t have 100% cinder code coverage.\n\nBut in this case, I think we\u0027re OK, because the ImageVolumeCreation happens in a file that is included in mypy coverage (cinder/volume/manager.py) and the values are populated from IntOpt configuration options.\n\nBut if someone adds code to create an ImageVolumeCache object somewhere else, in a file that\u0027s not yet included in the mypy-files.txt, there could be a problem.","commit_id":"51ac827372ee18875e07253f9c24bcd357b18da8"}]}
