From 2907ff695e77e9a9d9ae9b120e1a33332ad86b9f Mon Sep 17 00:00:00 2001 From: CorsCodini <45790567+CorsCodini@users.noreply.github.com> Date: Mon, 24 Nov 2025 14:07:03 +0100 Subject: [PATCH 1/3] add missing ] in doku --- NodeGraphQt/base/graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NodeGraphQt/base/graph.py b/NodeGraphQt/base/graph.py index 22d5f202..a09ee0ba 100644 --- a/NodeGraphQt/base/graph.py +++ b/NodeGraphQt/base/graph.py @@ -431,7 +431,7 @@ def _on_connection_changed(self, disconnected, connected): called when a pipe connection has been changed in the viewer. Args: - disconnected (list[list[widgets.port.PortItem]): + disconnected (list[list[widgets.port.PortItem]]): pair list of port view items. connected (list[list[widgets.port.PortItem]]): pair list of port view items. From 135dc1b0fbb74f3a95d25fac75aefab8b58a380e Mon Sep 17 00:00:00 2001 From: CorsCodini <45790567+CorsCodini@users.noreply.github.com> Date: Mon, 24 Nov 2025 14:08:23 +0100 Subject: [PATCH 2/3] fix doku pos is not a list, its a tuple --- NodeGraphQt/base/graph.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NodeGraphQt/base/graph.py b/NodeGraphQt/base/graph.py index a09ee0ba..88dafcc2 100644 --- a/NodeGraphQt/base/graph.py +++ b/NodeGraphQt/base/graph.py @@ -357,7 +357,7 @@ def _on_node_data_dropped(self, mimedata, pos): node_ids = sorted(re.findall(r'node:([\w\.]+)', search_str)) x, y = pos.x(), pos.y() for node_id in node_ids: - self.create_node(node_id, pos=[x, y]) + self.create_node(node_id, pos=(x, y)) x += 80 y += 80 elif mimedata.hasFormat('text/uri-list'): @@ -422,7 +422,7 @@ def _on_search_triggered(self, node_type, pos): Args: node_type (str): node identifier. - pos (tuple or list): x, y position for the node. + pos (tuple[int, int]): x, y position for the node. """ self.create_node(node_type, pos=pos) @@ -1200,7 +1200,7 @@ def create_node(self, node_type, name=None, selected=True, color=None, selected (bool): set created node to be selected. color (tuple or str): node color ``(255, 255, 255)`` or ``"#FFFFFF"``. text_color (tuple or str): text color ``(255, 255, 255)`` or ``"#FFFFFF"``. - pos (list[int, int]): initial x, y position for the node (default: ``(0, 0)``). + pos (tuple[int, int]): initial x, y position for the node (default: ``(0, 0)``). push_undo (bool): register the command to the undo stack. (default: True) Returns: From 578304c5b1d2787eb41b3e6516c7308d0e9cfebd Mon Sep 17 00:00:00 2001 From: CorsCodini <45790567+CorsCodini@users.noreply.github.com> Date: Mon, 24 Nov 2025 14:37:50 +0100 Subject: [PATCH 3/3] fix examples to tuples --- docs/examples/ex_menu.rst | 2 +- docs/examples/ex_node.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/examples/ex_menu.rst b/docs/examples/ex_menu.rst index bea0ea05..3673944d 100644 --- a/docs/examples/ex_menu.rst +++ b/docs/examples/ex_menu.rst @@ -100,7 +100,7 @@ can override context menus on a per node type basis. # create some nodes. foo_node = graph.create_node('io.github.jchanvfx.FooNode') - bar_node = graph.create_node('io.github.jchanvfx', pos=[300, 100]) + bar_node = graph.create_node('io.github.jchanvfx', pos=(300, 100)) # show widget. node_graph.widget.show() diff --git a/docs/examples/ex_node.rst b/docs/examples/ex_node.rst index c363fc73..0b97f2c4 100644 --- a/docs/examples/ex_node.rst +++ b/docs/examples/ex_node.rst @@ -35,7 +35,7 @@ Creating Nodes # here we create a couple nodes in the node graph. node_a = node_graph.create_node('io.github.jchanvfx.MyNode', name='node a') - node_b = node_graph.create_node('io.github.jchanvfx.MyNode', name='node b', pos=[300, 100]) + node_b = node_graph.create_node('io.github.jchanvfx.MyNode', name='node b', pos=(300, 100)) app.exec_()