From 818c3f2d43914940ba3cdf580c5a6f26a8200834 Mon Sep 17 00:00:00 2001 From: nilshah98 Date: Tue, 28 May 2019 00:27:24 +0530 Subject: projectManagement, ngspicetoModelica, subcircuit made pep8 compliant --- src/subcircuit/convertSub.py | 8 +++++--- src/subcircuit/newSub.py | 17 ++++++++++------- src/subcircuit/openSub.py | 4 +++- 3 files changed, 18 insertions(+), 11 deletions(-) (limited to 'src/subcircuit') diff --git a/src/subcircuit/convertSub.py b/src/subcircuit/convertSub.py index 23e6d52b..31ae3022 100644 --- a/src/subcircuit/convertSub.py +++ b/src/subcircuit/convertSub.py @@ -25,7 +25,7 @@ class convertSub(QtGui.QWidget): if self.obj_validation.validateKicad(self.projDir): # Checking if project has .cir file or not if self.obj_validation.validateCir(self.projDir): - #print "CIR file present" + # print "CIR file present" self.projName = os.path.basename(self.projDir) self.project = os.path.join(self.projDir, self.projName) @@ -35,10 +35,12 @@ class convertSub(QtGui.QWidget): else: self.msg = QtGui.QErrorMessage(None) self.msg.showMessage( - 'The subcircuit does not contain any Kicad netlist file for conversion.') + 'The subcircuit does not contain any Kicad netlist\ + file for conversion.') self.msg.setWindowTitle("Error Message") else: self.msg = QtGui.QErrorMessage(None) self.msg.showMessage( - 'Please select the subcircuit first. You can either create new subcircuit or open existing subcircuit') + 'Please select the subcircuit first. You can either create \ + new subcircuit or open existing subcircuit') self.msg.setWindowTitle("Error Message") diff --git a/src/subcircuit/newSub.py b/src/subcircuit/newSub.py index 6e0c7e63..79080e55 100644 --- a/src/subcircuit/newSub.py +++ b/src/subcircuit/newSub.py @@ -1,4 +1,4 @@ -from PyQt4 import QtGui, QtCore +from PyQt4 import QtGui, QtCore # noqa from projManagement.Validation import Validation from configuration.Appconfig import Appconfig from projManagement import Worker @@ -46,26 +46,29 @@ class NewSub(QtGui.QWidget): self.obj_workThread.start() self.close() except BaseException: - #print "Some Thing Went Wrong" + # print "Some Thing Went Wrong" self.msg = QtGui.QErrorMessage(self) self.msg.showMessage( - 'Unable to create subcircuit. Please make sure you have write permission on ' + + 'Unable to create subcircuit. Please make sure\ + you have write permission on ' + self.schematic_path) self.msg.setWindowTitle("Error Message") - self.obj_appconfig.current_subcircuit['SubcircuitName'] = self.schematic_path + self.obj_appconfig.current_subcircuit['SubcircuitName'] \ + = self.schematic_path elif self.reply == "CHECKEXIST": - #print "Project already exist" + # print "Project already exist" self.msg = QtGui.QErrorMessage(self) self.msg.showMessage( 'The subcircuit "' + self.create_schematic + - '" already exist.Please select the different name or delete existing subcircuit') + '" already exist.Please select the different name or delete' + + 'existing subcircuit') self.msg.setWindowTitle("Error Message") elif self.reply == "CHECKNAME": - #print "Name is not proper" + # print "Name is not proper" self.msg = QtGui.QErrorMessage(self) self.msg.showMessage( 'The subcircuit name should not contain space between them') diff --git a/src/subcircuit/openSub.py b/src/subcircuit/openSub.py index 32ad5d39..ba6d0617 100644 --- a/src/subcircuit/openSub.py +++ b/src/subcircuit/openSub.py @@ -19,7 +19,9 @@ class openSub(QtGui.QWidget): None, "Open File", "../SubcircuitLibrary")) if self.editfile: self.obj_Appconfig = Appconfig() - self.obj_Appconfig.current_subcircuit['SubcircuitName'] = self.editfile + self.obj_Appconfig.current_subcircuit['SubcircuitName'] = ( + self.editfile + ) self.schname = os.path.basename(self.editfile) self.editfile = os.path.join(self.editfile, self.schname) self.cmd = "eeschema " + self.editfile + ".sch " -- cgit