Skip to content

Commit 797bd32

Browse files
committed
Use count function
1 parent 44d9682 commit 797bd32

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

python/plugins/processing/gui/ParametersPanel.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -336,14 +336,8 @@ def somethingDependsOnThisParameter(self, parent):
336336
def setTableContent(self):
337337
params = self.alg.parameters
338338
outputs = self.alg.outputs
339-
numParams = 0
340-
for param in params:
341-
if not param.hidden:
342-
numParams += 1
343-
numOutputs = 0
344-
for output in outputs:
345-
if not output.hidden:
346-
numOutputs += 1
339+
numParams = count(p for p in params if not p.hidden)
340+
numParams = count(o for o in outputs if not o.hidden)
347341
self.tableWidget.setRowCount(numParams + numOutputs)
348342

349343
i = 0

0 commit comments

Comments
 (0)