From c2be2f3d4a0edc6ed7da1a26c9e7582d5e371048 Mon Sep 17 00:00:00 2001 From: Daniel Falbel Date: Tue, 9 Apr 2024 15:28:17 -0300 Subject: [PATCH] Add a comment on why we have this line --- .../python_files/positron/positron_ipykernel/connections.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/positron-python/python_files/positron/positron_ipykernel/connections.py b/extensions/positron-python/python_files/positron/positron_ipykernel/connections.py index 2dad51ca0f94..ec109ea4ef4c 100644 --- a/extensions/positron-python/python_files/positron/positron_ipykernel/connections.py +++ b/extensions/positron-python/python_files/positron/positron_ipykernel/connections.py @@ -224,6 +224,9 @@ def on_comm_open(self, comm: BaseComm): self.comms[comm_id] = connections_comm def _wrap_connection(self, obj: Any) -> Connection: + # this check is redundant with the if branches below, but allows us to make + # sure the `object_is_supported` method is always in sync with what we really + # support in the connections pane. if not self.object_is_supported(obj): type_name = type(obj).__name__ raise UnsupportedConnectionError(f"Unsupported connection type {type_name}")