)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a89a0a41916add415b6e8c16fb6ebb710fb3b8c2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"41c4b95f_5f63e32d","updated":"2025-02-24 11:41:52.000000000","message":"Ooops, good catch. I wonder if we can have unit tests for this call.","commit_id":"f546d61cf8436738a7617b6daa86d3420848c099"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ffc425d555be4cd4e85281bacdb827f9139835c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"af8dde80_b9ea37b2","updated":"2025-02-24 14:45:16.000000000","message":"There\u0027s a larger fix needed here, but that\u0027s not your problem. Thanks for the fix!","commit_id":"f546d61cf8436738a7617b6daa86d3420848c099"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"4195736e81a9cbeb619f0e37f5ad42226eb7dd9b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"52244161_fb1d70d3","in_reply_to":"41c4b95f_5f63e32d","updated":"2025-02-24 14:45:37.000000000","message":"We could, but I think fixing mypy is a superior option?","commit_id":"f546d61cf8436738a7617b6daa86d3420848c099"}],"openstack/baremetal/v1/_proxy.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ffc425d555be4cd4e85281bacdb827f9139835c4","unresolved":true,"context_lines":[{"line_number":785,"context_line":"        :returns: Connection information for the console."},{"line_number":786,"context_line":"        \"\"\""},{"line_number":787,"context_line":"        res \u003d self._get_resource(_node.Node, node)"},{"line_number":788,"context_line":"        return res.get_console(self)"},{"line_number":789,"context_line":""},{"line_number":790,"context_line":"    def enable_node_console(self, node):"},{"line_number":791,"context_line":"        \"\"\"Enable the console for a node."}],"source_content_type":"text/x-python","patch_set":1,"id":"620f68f5_e0a05bd0","line":788,"updated":"2025-02-24 14:45:16.000000000","message":"I\u0027m surprised mypy didn\u0027t catch this. I guess it doesn\u0027t know the type of `res` here but it should: `_get_resource` *is* typed.\n\n```\n❯ git diff\ndiff --git openstack/baremetal/v1/_proxy.py openstack/baremetal/v1/_proxy.py\nindex 3a51cc9c7..b16cb9cdd 100644\n--- openstack/baremetal/v1/_proxy.py\n+++ openstack/baremetal/v1/_proxy.py\n@@ -785,6 +785,8 @@ class Proxy(proxy.Proxy):\n         :returns: Connection information for the console.\n         \"\"\"\n         res \u003d self._get_resource(_node.Node, node)\n+        reveal_type(res)\n+        reveal_type(res.get_node_console)\n         return res.get_node_console(self)\n \n     def enable_node_console(self, node):\n```\n\n```\n❯ python -m mypy openstack\nopenstack/baremetal/v1/_proxy.py: note: In member \"get_node_console\" of class \"Proxy\":\nopenstack/baremetal/v1/_proxy.py:788:21: note: Revealed type is \"openstack.baremetal.v1.node.Node\"\nopenstack/baremetal/v1/_proxy.py:789:21: note: Revealed type is \"Any\"\nSuccess: no issues found in 1100 source files\n```\n\n😕\n\n*Later:* Ah, it appears to be because we define `__getattribute__` on `Resource`. If I remove that, this gets flagged (along with another few errors):\n\n```\nopenstack/exceptions.py: note: In member \"__init__\" of class \"MethodNotSupported\":\nopenstack/exceptions.py:148:20: error: Item \"Resource\" of \"Union[Resource, type[Resource]]\" has no attribute \"__name__\"  [union-attr]\nopenstack/block_storage/v3/_proxy.py: note: In member \"reset_group_state\" of class \"Proxy\":\nopenstack/block_storage/v3/_proxy.py:1538:16: error: \"Group\" has no attribute \"reset_status\"  [attr-defined]\nopenstack/baremetal/v1/_proxy.py: note: In member \"get_node_console\" of class \"Proxy\":\nopenstack/baremetal/v1/_proxy.py:788:16: error: \"Node\" has no attribute \"get_node_console\"  [attr-defined]\n```\n\nWe probably want to find a way to resolve that, but that\u0027s secondary to this.","commit_id":"f546d61cf8436738a7617b6daa86d3420848c099"}]}
