Signed-off-by: falkTX <falktx@falktx.com>tags/v2.1-rc1
| @@ -81,7 +81,7 @@ def findBinaries(binPath, pluginType, OS): | |||||
| extensions = (".so",) | extensions = (".so",) | ||||
| for root, dirs, files in os.walk(binPath): | for root, dirs, files in os.walk(binPath): | ||||
| for name in [name for name in files if name.lower().endswith(extensions)]: | |||||
| for name in tuple(name for name in files if name.lower().endswith(extensions)): | |||||
| binaries.append(os.path.join(root, name)) | binaries.append(os.path.join(root, name)) | ||||
| return binaries | return binaries | ||||
| @@ -90,7 +90,7 @@ def findVST3Binaries(binPath): | |||||
| binaries = [] | binaries = [] | ||||
| for root, dirs, files in os.walk(binPath): | for root, dirs, files in os.walk(binPath): | ||||
| for name in [name for name in files if name.lower().endswith(".vst3")]: | |||||
| for name in tuple(name for name in files if name.lower().endswith(".vst3")): | |||||
| binaries.append(os.path.join(root, name)) | binaries.append(os.path.join(root, name)) | ||||
| return binaries | return binaries | ||||
| @@ -111,7 +111,7 @@ def findMacVSTBundles(bundlePath, isVST3): | |||||
| for root, dirs, files in os.walk(bundlePath, followlinks=True): | for root, dirs, files in os.walk(bundlePath, followlinks=True): | ||||
| #if root == bundlePath: continue # FIXME | #if root == bundlePath: continue # FIXME | ||||
| for name in [name for name in dirs if name.lower().endswith(extension)]: | |||||
| for name in tuple(name for name in dirs if name.lower().endswith(extension)): | |||||
| bundles.append(os.path.join(root, name)) | bundles.append(os.path.join(root, name)) | ||||
| return bundles | return bundles | ||||
| @@ -125,7 +125,7 @@ def findFilenames(filePath, stype): | |||||
| return [] | return [] | ||||
| for root, dirs, files in os.walk(filePath): | for root, dirs, files in os.walk(filePath): | ||||
| for name in [name for name in files if name.lower().endswith(extensions)]: | |||||
| for name in tuple(name for name in files if name.lower().endswith(extensions)): | |||||
| filenames.append(os.path.join(root, name)) | filenames.append(os.path.join(root, name)) | ||||
| return filenames | return filenames | ||||
| @@ -697,7 +697,7 @@ def recheck_all_plugins(qobject, startValue, percentValue, curValue): | |||||
| # Get all RDF files | # Get all RDF files | ||||
| for PATH in LADSPA_RDF_PATH: | for PATH in LADSPA_RDF_PATH: | ||||
| for root, dirs, files in os.walk(PATH): | for root, dirs, files in os.walk(PATH): | ||||
| for filename in [filename for filename in files if filename.lower().endswith(rdfExtensions)]: | |||||
| for filename in tuple(filename for filename in files if filename.lower().endswith(rdfExtensions)): | |||||
| rdfFiles.append(os.path.join(root, filename)) | rdfFiles.append(os.path.join(root, filename)) | ||||
| # Parse all RDF files | # Parse all RDF files | ||||
| @@ -1362,7 +1362,7 @@ class PatchScene(QGraphicsScene): | |||||
| items = self.items(self.m_pointer_border) | items = self.items(self.m_pointer_border) | ||||
| for item in items: | for item in items: | ||||
| if item and item.type() in [CanvasLineType, CanvasBezierLineType]: | |||||
| if item and item.type() in (CanvasLineType, CanvasBezierLineType): | |||||
| item.triggerDisconnect() | item.triggerDisconnect() | ||||
| QGraphicsScene.mousePressEvent(self, event) | QGraphicsScene.mousePressEvent(self, event) | ||||
| @@ -1392,7 +1392,7 @@ class PatchScene(QGraphicsScene): | |||||
| trail = QPolygonF([event.scenePos(), event.lastScenePos(), event.scenePos()]) | trail = QPolygonF([event.scenePos(), event.lastScenePos(), event.scenePos()]) | ||||
| items = self.items(trail) | items = self.items(trail) | ||||
| for item in items: | for item in items: | ||||
| if item and item.type() in [CanvasLineType, CanvasBezierLineType]: | |||||
| if item and item.type() in (CanvasLineType, CanvasBezierLineType): | |||||
| item.triggerDisconnect() | item.triggerDisconnect() | ||||
| QGraphicsScene.mouseMoveEvent(self, event) | QGraphicsScene.mouseMoveEvent(self, event) | ||||
| @@ -287,7 +287,7 @@ class PatchScene(QGraphicsScene): | |||||
| items = self.items(self.m_pointer_border) | items = self.items(self.m_pointer_border) | ||||
| for item in items: | for item in items: | ||||
| if item and item.type() in [CanvasLineType, CanvasBezierLineType, CanvasPortType]: | |||||
| if item and item.type() in (CanvasLineType, CanvasBezierLineType, CanvasPortType): | |||||
| item.triggerDisconnect() | item.triggerDisconnect() | ||||
| QGraphicsScene.mousePressEvent(self, event) | QGraphicsScene.mousePressEvent(self, event) | ||||
| @@ -296,9 +296,9 @@ class PatchScene(QGraphicsScene): | |||||
| if self.m_mouse_down_init: | if self.m_mouse_down_init: | ||||
| self.m_mouse_down_init = False | self.m_mouse_down_init = False | ||||
| topmost = self.itemAt(event.scenePos(), self.m_view.transform()) | topmost = self.itemAt(event.scenePos(), self.m_view.transform()) | ||||
| self.m_mouse_rubberband = not (topmost and topmost.type() in [CanvasBoxType, | |||||
| self.m_mouse_rubberband = not (topmost and topmost.type() in (CanvasBoxType, | |||||
| CanvasIconType, | CanvasIconType, | ||||
| CanvasPortType]) | |||||
| CanvasPortType)) | |||||
| if self.m_mouse_rubberband: | if self.m_mouse_rubberband: | ||||
| event.accept() | event.accept() | ||||
| @@ -325,7 +325,7 @@ class PatchScene(QGraphicsScene): | |||||
| trail = QPolygonF([event.scenePos(), event.lastScenePos(), event.scenePos()]) | trail = QPolygonF([event.scenePos(), event.lastScenePos(), event.scenePos()]) | ||||
| items = self.items(trail) | items = self.items(trail) | ||||
| for item in items: | for item in items: | ||||
| if item and item.type() in [CanvasLineType, CanvasBezierLineType]: | |||||
| if item and item.type() in (CanvasLineType, CanvasBezierLineType): | |||||
| item.triggerDisconnect() | item.triggerDisconnect() | ||||
| QGraphicsScene.mouseMoveEvent(self, event) | QGraphicsScene.mouseMoveEvent(self, event) | ||||