Skip to content

Commit b489fdf

Browse files
committed
doc fixes
1 parent ca39c15 commit b489fdf

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

NodeGraphQt/nodes/base_node.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ def add_accept_port_type(self, port, port_type_data):
668668
669669
.. highlight:: python
670670
.. code-block:: python
671+
671672
{
672673
'port_name': 'foo'
673674
'port_type': PortTypeEnum.IN.value
@@ -727,6 +728,7 @@ def add_reject_port_type(self, port, port_type_data):
727728
728729
.. highlight:: python
729730
.. code-block:: python
731+
730732
{
731733
'port_name': 'foo'
732734
'port_type': PortTypeEnum.IN.value

docs/examples/ex_port.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,14 @@ Connection Constrains
148148

149149
From version ``v0.6.0`` port object can now have pipe connection constraints the functions implemented are:
150150

151-
:meth:`NodeGraphQt.Port.add_accept_ports_type` and :meth:`NodeGraphQt.Port.add_reject_ports_type`
151+
- :meth:`NodeGraphQt.Port.add_accept_port_type`
152+
- :meth:`NodeGraphQt.Port.add_reject_port_type`
152153

153154
this can also be set on the ``BaseNode`` level as well with:
154-
:meth:`NodeGraphQt.BaseNode.add_accept_port_type`, :meth:`NodeGraphQt.BaseNode.add_accept_port_type`
155+
156+
- :meth:`NodeGraphQt.BaseNode.add_accept_port_type`
157+
- :meth:`NodeGraphQt.BaseNode.add_accept_port_type`
158+
155159

156160
Here's an example snippet to add pipe connection constraints to a port.
157161

@@ -191,15 +195,17 @@ Here's an example snippet to add pipe connection constraints to a port.
191195
192196
# create node inputs.
193197
194-
# port "in A" will only accept pipe connections from port "output 1" under the node "BasicNodeA".
198+
# port "in A" will only accept pipe connections from port "output 1"
199+
# under the node "BasicNodeA".
195200
in_port_a = self.add_input('in A')
196201
in_port_a.add_accept_port_type(
197202
port_name='output 1',
198203
port_type=PortTypeEnum.OUT.value,
199204
node_type='io.github.jchanvfx.BasicNodeA'
200205
)
201206
202-
# port "in A" will reject pipe connections from port "output 1" under the node "BasicNodeA".
207+
# port "in A" will reject pipe connections from port "output 1"
208+
# under the node "BasicNodeA".
203209
in_port_b = self.add_input('in B')
204210
in_port_b.add_reject_port_type(
205211
port_name='output 1',

0 commit comments

Comments
 (0)