Skip to content

Commit 272c08d

Browse files
committed
doc string cleanup
1 parent 8f576c3 commit 272c08d

File tree

4 files changed

+38
-26
lines changed

4 files changed

+38
-26
lines changed

NodeGraphQt/base/graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ def registered_nodes(self):
829829

830830
def register_node(self, node, alias=None):
831831
"""
832-
Register the node to the :meth:`NodeGraph.node_factory
832+
Register the node to the :meth:`NodeGraph.node_factory`
833833
834834
Args:
835835
node (NodeGraphQt.NodeObject): node.
@@ -840,7 +840,7 @@ def register_node(self, node, alias=None):
840840

841841
def register_nodes(self, nodes):
842842
"""
843-
Register the nodes to the :meth:`NodeGraph.node_factory
843+
Register the nodes to the :meth:`NodeGraph.node_factory`
844844
845845
Args:
846846
nodes (list[NodeGraphQt.NodeObject]): list of nodes.

NodeGraphQt/base/node.py

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -976,27 +976,32 @@ def delete_output(self, port):
976976

977977
def set_ports(self, port_data):
978978
"""
979-
Set node input and output ports from specified port data.
980-
981-
example port data:
982-
{
983-
'input_ports':
984-
[{
985-
'name': 'input',
986-
'multi_connection': True,
987-
'display_name': 'Input',
988-
'data_type': 'NoneType',
989-
'locked': False
990-
}],
991-
'output_ports':
992-
[{
993-
'name': 'output',
994-
'multi_connection': True,
995-
'display_name': 'Output',
996-
'data_type': 'NoneType',
997-
'locked': False
998-
}]
999-
}
979+
Create node input and output ports from specified port data.
980+
981+
Hint:
982+
example snippet of port data.
983+
984+
.. highlight:: python
985+
.. code-block:: python
986+
987+
{
988+
'input_ports':
989+
[{
990+
'name': 'input',
991+
'multi_connection': True,
992+
'display_name': 'Input',
993+
'data_type': 'NoneType',
994+
'locked': False
995+
}],
996+
'output_ports':
997+
[{
998+
'name': 'output',
999+
'multi_connection': True,
1000+
'display_name': 'Output',
1001+
'data_type': 'NoneType',
1002+
'locked': False
1003+
}]
1004+
}
10001005
10011006
Args:
10021007
port_data(dict): port data.

NodeGraphQt/constants.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
#!/usr/bin/python
22
# -*- coding: utf-8 -*-
33
import os
4+
5+
from Qt import QtWidgets
6+
47
from .pkg_info import __version__
5-
from . import QtWidgets
8+
9+
__doc__ = """
10+
The module contains variables used throughout the whole ``NodeGraphQt`` library.
11+
"""
612

713
#: Current version of the NodeGraphQt framework.
814
VERSION = __version__

docs/_themes/sphinx_rtd_theme/static/css/theme.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3378,7 +3378,8 @@ input[type=checkbox][disabled],input[type=radio][disabled]{
33783378
margin-bottom:0!important
33793379
}
33803380
.wy-table-responsive table td,.wy-table-responsive table th{
3381-
white-space:nowrap
3381+
/*white-space:nowrap;*/
3382+
white-space:break-word;
33823383
}
33833384
a{
33843385
color: #20fde8;
@@ -4749,4 +4750,4 @@ h2 {
47494750
/* func tweaks */
47504751
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descname {
47514752
margin-right: 2px;
4752-
}
4753+
}

0 commit comments

Comments
 (0)