Skip to content

Commit 093af5e

Browse files
committed
Pylint
1 parent deb11ff commit 093af5e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Orange/canvas/canvas/items/nodeitem.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class NodeBodyItem(GraphicsPathObject):
7777
"""
7878
def __init__(self, parent=None):
7979
GraphicsPathObject.__init__(self, parent)
80-
assert(isinstance(parent, NodeItem))
80+
assert isinstance(parent, NodeItem)
8181

8282
self.__processingState = 0
8383
self.__progress = -1
@@ -1192,7 +1192,7 @@ def __updateTitleText(self):
11921192
if "progress" in format_fields and len(format_fields) == 1:
11931193
# Insert progress into the status text format string.
11941194
spec, _ = format_fields["progress"]
1195-
if spec != None:
1195+
if spec is not None:
11961196
progress_included = True
11971197
progress_str = "{0:.0f}%".format(self.progress())
11981198
status_text.append(msg.format(progress=progress_str))
@@ -1246,12 +1246,13 @@ def __updateMessages(self):
12461246
def mousePressEvent(self, event):
12471247
if self.mousePressTime.elapsed() < QApplication.doubleClickInterval():
12481248
# Double-click triggers two mouse press events and a double-click event.
1249-
# Ignore the second mouse press event (causes widget's node relocation with Logitech's Smart Move).
1249+
# Ignore the second mouse press event (causes widget's node relocation with
1250+
# Logitech's Smart Move).
12501251
event.ignore()
12511252
else:
12521253
self.mousePressTime.restart()
12531254
if self.shapeItem.path().contains(event.pos()):
1254-
return super().mousePressEvent(event)
1255+
super().mousePressEvent(event)
12551256
else:
12561257
event.ignore()
12571258

@@ -1264,17 +1265,17 @@ def mouseDoubleClickEvent(self, event):
12641265

12651266
def contextMenuEvent(self, event):
12661267
if self.shapeItem.path().contains(event.pos()):
1267-
return super().contextMenuEvent(event)
1268+
super().contextMenuEvent(event)
12681269
else:
12691270
event.ignore()
12701271

12711272
def focusInEvent(self, event):
12721273
self.shapeItem.setHasFocus(True)
1273-
return super().focusInEvent(event)
1274+
super().focusInEvent(event)
12741275

12751276
def focusOutEvent(self, event):
12761277
self.shapeItem.setHasFocus(False)
1277-
return super().focusOutEvent(event)
1278+
super().focusOutEvent(event)
12781279

12791280
def changeEvent(self, event):
12801281
if event.type() == QEvent.PaletteChange:
@@ -1341,13 +1342,13 @@ def NodeItem_toolTipHelper(node, links_in=[], links_out=[]):
13411342
inputs = [channel_fmt.format(inp.name) for inp in desc.inputs]
13421343
inputs = inputs_list_fmt.format(inputs="".join(inputs))
13431344
else:
1344-
inputs = "No inputs<hr/>"
1345+
inputs = "No inputs<hr/>"
13451346

13461347
if desc.outputs:
13471348
outputs = [channel_fmt.format(out.name) for out in desc.outputs]
13481349
outputs = outputs_list_fmt.format(outputs="".join(outputs))
13491350
else:
1350-
outputs = "No outputs"
1351+
outputs = "No outputs"
13511352

13521353
tooltip = title + inputs + outputs
13531354
style = "ul { margin-top: 1px; margin-bottom: 1px; }"

0 commit comments

Comments
 (0)