diff options
author | nilshah98 | 2019-06-07 19:25:00 +0530 |
---|---|---|
committer | nilshah98 | 2019-06-13 16:11:14 +0530 |
commit | 8d628dc33e1190dd1f8827bbd26f998d31d0827a (patch) | |
tree | 4e4b7875a125b9e209b6ef09336a30a6470add11 /src/frontEnd/ProjectExplorer.py | |
parent | 89c637c341a281d31ccd63be65a3504d6db79882 (diff) | |
download | eSim-8d628dc33e1190dd1f8827bbd26f998d31d0827a.tar.gz eSim-8d628dc33e1190dd1f8827bbd26f998d31d0827a.tar.bz2 eSim-8d628dc33e1190dd1f8827bbd26f998d31d0827a.zip |
projectExplorer made pep8 compliant
Diffstat (limited to 'src/frontEnd/ProjectExplorer.py')
-rw-r--r-- | src/frontEnd/ProjectExplorer.py | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py index cac9f986..8d0ef4ec 100644 --- a/src/frontEnd/ProjectExplorer.py +++ b/src/frontEnd/ProjectExplorer.py @@ -73,9 +73,9 @@ class ProjectExplorer(QtGui.QWidget): parentnode = QtGui.QTreeWidgetItem( self.treewidget, [pathlist[-1], parents]) for files in children: - QtGui.QTreeWidgetItem( + QtGui.QTreeWidgetItem( parentnode, [files, os.path.join(parents, files)] - ) + ) ( self.obj_appconfig. @@ -216,7 +216,7 @@ class ProjectExplorer(QtGui.QWidget): for items in self.treewidget.selectedItems(): items.removeChild(items.child(0)) for files in filelistnew: - QtGui.QTreeWidgetItem( + QtGui.QTreeWidgetItem( parentnode, [ files, os.path.join( self.filePath, files)]) @@ -229,12 +229,14 @@ class ProjectExplorer(QtGui.QWidget): def renameProject(self): indexItem = self.treewidget.currentIndex() baseFileName = str(indexItem.data()) - newBaseFileName, ok = QtGui.QInputDialog.getText(self, 'Rename Project', 'Project Name:', - QtGui.QLineEdit.Normal, baseFileName) + newBaseFileName, ok = QtGui.QInputDialog.getText( + self, 'Rename Project', 'Project Name:', + QtGui.QLineEdit.Normal, baseFileName + ) if ok and newBaseFileName: newBaseFileName = str(newBaseFileName) - projectPath, projectFiles = list(self.obj_appconfig.project_explorer.items())[ - indexItem.row()] + projectPath, projectFiles = list( + self.obj_appconfig.project_explorer.items())[indexItem.row()] updatedProjectFiles = [] # rename files matching project name @@ -257,7 +259,9 @@ class ProjectExplorer(QtGui.QWidget): # update project_explorer dictionary del self.obj_appconfig.project_explorer[projectPath] - self.obj_appconfig.project_explorer[updatedProjectPath] = updatedProjectFiles + self.obj_appconfig.project_explorer[updatedProjectPath] = ( + updatedProjectFiles + ) # save project_explorer dictionary on disk json.dump(self.obj_appconfig.project_explorer, @@ -265,6 +269,8 @@ class ProjectExplorer(QtGui.QWidget): # recreate project explorer tree self.treewidget.clear() - for parent, children in self.obj_appconfig.project_explorer.items(): + for parent, children in ( + self.obj_appconfig.project_explorer.items() + ): self.addTreeNode(parent, children) # """ |