Skip to content

Commit be98554

Browse files
committed
minor tweaks
1 parent dc19cb7 commit be98554

File tree

10 files changed

+13
-11
lines changed

10 files changed

+13
-11
lines changed

NodeGraphQt/base/commands.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def undo(self):
6767

6868
def redo(self):
6969
do_redo = False
70-
7170
try:
7271
if self.old_val != self.new_val:
7372
do_redo = True

NodeGraphQt/base/graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def _insert_node(self, pipe, node_id, prev_node_pos):
140140
node = self.get_node_by_id(node_id)
141141

142142
# exclude the BackdropNode
143-
if not isinstance(node,BaseNode):
143+
if not isinstance(node, BaseNode):
144144
return
145145

146146
disconnected = [(pipe.input_port, pipe.output_port)]

NodeGraphQt/base/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def to_dict(self):
234234
custom_props = node_dict.pop('_custom_prop', {})
235235

236236
if custom_props:
237-
# exclude the data which can not be serialed (like numpy array)
237+
# exclude the data which can not be serialized (like numpy array)
238238
to_remove = []
239239
types = [float, str, int, list, dict, bool, None, complex, tuple]
240240
for k, v in custom_props.items():

NodeGraphQt/base/node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
NODE_PROP_QTEXTEDIT,
88
NODE_PROP_QCOMBO,
99
NODE_PROP_QCHECKBOX,
10-
IN_PORT, OUT_PORT,
1110
NODE_PROP_FILE,
1211
NODE_PROP_FLOAT,
13-
NODE_PROP_INT)
12+
NODE_PROP_INT,
13+
IN_PORT, OUT_PORT)
1414
from NodeGraphQt.errors import PortRegistrationError
1515
from NodeGraphQt.qgraphics.node_backdrop import BackdropNodeItem
1616
from NodeGraphQt.qgraphics.node_base import NodeItem

NodeGraphQt/base/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def setup_context_menu(graph):
3535
file_menu.add_command('Open...', _open_session, QtGui.QKeySequence.Open)
3636
file_menu.add_command('Save...', _save_session, QtGui.QKeySequence.Save)
3737
file_menu.add_command('Save As...', _save_session_as, 'Ctrl+Shift+s')
38-
file_menu.add_command('New', _new_session)
38+
file_menu.add_command('New Session', _new_session)
3939

4040
file_menu.add_separator()
4141

NodeGraphQt/qgraphics/node_abstract.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/usr/bin/python
22
from NodeGraphQt import QtCore, QtWidgets
33

4-
from NodeGraphQt.constants import Z_VAL_NODE, NODE_WIDTH, NODE_HEIGHT, ITEM_CACHE_MODE
4+
from NodeGraphQt.constants import (Z_VAL_NODE, NODE_WIDTH, NODE_HEIGHT,
5+
ITEM_CACHE_MODE)
56

67

78
class AbstractNodeItem(QtWidgets.QGraphicsItem):

NodeGraphQt/qgraphics/node_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def auto_switch_mode(self):
501501

502502
self.set_proxy_mode(width < self._porxy_mode_threshold)
503503

504-
def set_proxy_mode(self,mode):
504+
def set_proxy_mode(self, mode):
505505
if mode is self._proxy_mode:
506506
return
507507

NodeGraphQt/qgraphics/pipe.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
PIPE_HIGHLIGHT_COLOR, PIPE_DISABLED_COLOR,
88
PIPE_STYLE_DASHED, PIPE_STYLE_DEFAULT, PIPE_STYLE_DOTTED,
99
PIPE_LAYOUT_STRAIGHT, PIPE_WIDTH, IN_PORT, OUT_PORT, Z_VAL_PIPE,
10-
Z_VAL_NODE_WIDGET,PIPE_LAYOUT_ANGLE,
11-
PIPE_LAYOUT_CURVED,ITEM_CACHE_MODE)
10+
Z_VAL_NODE_WIDGET,
11+
PIPE_LAYOUT_ANGLE, PIPE_LAYOUT_CURVED,
12+
ITEM_CACHE_MODE)
1213
from NodeGraphQt.qgraphics.port import PortItem
1314

1415
PIPE_STYLES = {

NodeGraphQt/widgets/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get_menu(self, name, node_id=None):
3030
if isinstance(node,menu.node_class):
3131
return menu
3232

33-
def get_menus(self,node_class):
33+
def get_menus(self, node_class):
3434
menus = []
3535
for action in self.actions():
3636
menu = action.menu()

NodeGraphQt/widgets/node_widgets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from NodeGraphQt.widgets.file_dialog import file_dialog
77
from NodeGraphQt.widgets.properties import _valueEdit
88

9+
910
class _NodeGroupBox(QtWidgets.QGroupBox):
1011

1112
def __init__(self, label, parent=None):

0 commit comments

Comments
 (0)