Fixed a few PEP 8 related issues.

Fri, 07 Jan 2011 15:52:50 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 07 Jan 2011 15:52:50 +0100
changeset 826
2e3e2055e715
parent 825
9cdec3c5bc07
child 828
1161da54aeb8
child 834
46d10fe31c5e

Fixed a few PEP 8 related issues.

DebugClients/Python/DebugBase.py file | annotate | diff | comparison | revisions
DebugClients/Python3/DebugBase.py file | annotate | diff | comparison | revisions
Helpviewer/Download/DownloadItem.py file | annotate | diff | comparison | revisions
Helpviewer/Download/DownloadManager.py file | annotate | diff | comparison | revisions
Helpviewer/HelpBrowserWV.py file | annotate | diff | comparison | revisions
Helpviewer/Network/FtpReply.py file | annotate | diff | comparison | revisions
Helpviewer/Network/NetworkAccessManager.py file | annotate | diff | comparison | revisions
Helpviewer/UrlBar/UrlBar.py file | annotate | diff | comparison | revisions
IconEditor/IconEditorPalette.py file | annotate | diff | comparison | revisions
Preferences/ConfigurationPages/HelpWebBrowserPage.py file | annotate | diff | comparison | revisions
Preferences/ConfigurationPages/ProjectBrowserPage.py file | annotate | diff | comparison | revisions
Project/ProjectFormsBrowser.py file | annotate | diff | comparison | revisions
Project/ProjectResourcesBrowser.py file | annotate | diff | comparison | revisions
QScintilla/Editor.py file | annotate | diff | comparison | revisions
QScintilla/Lexers/LexerPython.py file | annotate | diff | comparison | revisions
QScintilla/MiniEditor.py file | annotate | diff | comparison | revisions
QScintilla/QsciScintillaCompat.py file | annotate | diff | comparison | revisions
QScintilla/Shell.py file | annotate | diff | comparison | revisions
ViewManager/ViewManager.py file | annotate | diff | comparison | revisions
--- a/DebugClients/Python/DebugBase.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/DebugClients/Python/DebugBase.py	Fri Jan 07 15:52:50 2011 +0100
@@ -200,7 +200,8 @@
         """
         if self.stop_here(frame) or self.break_here(frame):
             self.user_line(frame)
-            if self.quitting: raise bdb.BdbQuit
+            if self.quitting:
+                raise bdb.BdbQuit
         return self.trace_dispatch
 
     def dispatch_return(self, frame, arg):
@@ -227,7 +228,8 @@
         """
         if not self.__skip_it(frame):
             self.user_exception(frame, arg)
-            if self.quitting: raise bdb.BdbQuit
+            if self.quitting:
+                raise bdb.BdbQuit
         return self.trace_dispatch
 
     def set_trace(self, frame = None):
--- a/DebugClients/Python3/DebugBase.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/DebugClients/Python3/DebugBase.py	Fri Jan 07 15:52:50 2011 +0100
@@ -199,7 +199,8 @@
         """
         if self.stop_here(frame) or self.break_here(frame):
             self.user_line(frame)
-            if self.quitting: raise bdb.BdbQuit
+            if self.quitting:
+                raise bdb.BdbQuit
         return self.trace_dispatch
 
     def dispatch_return(self, frame, arg):
@@ -226,7 +227,8 @@
         """
         if not self.__skip_it(frame):
             self.user_exception(frame, arg)
-            if self.quitting: raise bdb.BdbQuit
+            if self.quitting:
+                raise bdb.BdbQuit
         return self.trace_dispatch
 
     def set_trace(self, frame = None):
--- a/Helpviewer/Download/DownloadItem.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/Helpviewer/Download/DownloadItem.py	Fri Jan 07 15:52:50 2011 +0100
@@ -237,7 +237,7 @@
         
         name = directory + baseName
         if endName:
-           name += '.' + endName
+            name += '.' + endName
         i = 1
         while QFile.exists(name):
             # file exists already, don't overwrite
--- a/Helpviewer/Download/DownloadManager.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/Helpviewer/Download/DownloadManager.py	Fri Jan 07 15:52:50 2011 +0100
@@ -336,7 +336,7 @@
         self.__model.removeRows(0, len(self.__downloads))
         if len(self.__downloads) == 0 and \
            self.__iconProvider is not None:
-               self.__iconProvider = None
+            self.__iconProvider = None
         
         self.changeOccurred()
         self.__updateActiveItemCount()
--- a/Helpviewer/HelpBrowserWV.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/Helpviewer/HelpBrowserWV.py	Fri Jan 07 15:52:50 2011 +0100
@@ -58,7 +58,7 @@
         
         @param url url of the XML file defining the search provider (string)
         """
-        self.__mw.openSearchManager().addEngine(QUrl(url));
+        self.__mw.openSearchManager().addEngine(QUrl(url))
 
 class LinkedResource(object):
     """
--- a/Helpviewer/Network/FtpReply.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/Helpviewer/Network/FtpReply.py	Fri Jan 07 15:52:50 2011 +0100
@@ -322,7 +322,7 @@
         basePath = u.path()
         
         linkClasses = {}
-        iconSize = QWebSettings.globalSettings().fontSize(QWebSettings.DefaultFontSize);
+        iconSize = QWebSettings.globalSettings().fontSize(QWebSettings.DefaultFontSize)
         
         parent = u.resolved(QUrl(".."))
         if parent.isParentOf(u):
--- a/Helpviewer/Network/NetworkAccessManager.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/Helpviewer/Network/NetworkAccessManager.py	Fri Jan 07 15:52:50 2011 +0100
@@ -132,7 +132,7 @@
         
         req = QNetworkRequest(request)
         if hasattr(QNetworkRequest, 'HttpPipeliningAllowedAttribute'):
-            req.setAttribute(QNetworkRequest.HttpPipeliningAllowedAttribute, True);
+            req.setAttribute(QNetworkRequest.HttpPipeliningAllowedAttribute, True)
         if not self.__acceptLanguage.isEmpty():
             req.setRawHeader("Accept-Language", self.__acceptLanguage)
         
--- a/Helpviewer/UrlBar/UrlBar.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/Helpviewer/UrlBar/UrlBar.py	Fri Jan 07 15:52:50 2011 +0100
@@ -231,8 +231,8 @@
             if progress == 0:
                 if self.__browser.url().scheme() == "https":
                     backgroundColor = Preferences.getHelp("SaveUrlColor")
-                p.setBrush(QPalette.Base, backgroundColor);
-                p.setBrush(QPalette.Text, foregroundColor);
+                p.setBrush(QPalette.Base, backgroundColor)
+                p.setBrush(QPalette.Text, foregroundColor)
             else:
                 if self.__browser.url().scheme() == "https":
                     backgroundColor = Preferences.getHelp("SaveUrlColor")
--- a/IconEditor/IconEditorPalette.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/IconEditor/IconEditorPalette.py	Fri Jan 07 15:52:50 2011 +0100
@@ -146,9 +146,9 @@
         @param val value of the alpha channel
         """
         if val != self.__currentAlpha:
-           col = QColor(self.__currentColor) 
-           col.setAlpha(val)
-           self.colorSelected.emit(col)
+            col = QColor(self.__currentColor) 
+            col.setAlpha(val)
+            self.colorSelected.emit(col)
     
     def setCompositingMode(self, mode):
         """
--- a/Preferences/ConfigurationPages/HelpWebBrowserPage.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/Preferences/ConfigurationPages/HelpWebBrowserPage.py	Fri Jan 07 15:52:50 2011 +0100
@@ -97,9 +97,9 @@
         historyLimit = Preferences.getHelp("HistoryLimit")
         idx = 0
         if historyLimit == 1:
-           idx = 0
+            idx = 0
         elif historyLimit == 7:
-           idx = 1 
+            idx = 1 
         elif historyLimit == 14:
             idx = 2
         elif historyLimit == 30:
--- a/Preferences/ConfigurationPages/ProjectBrowserPage.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/Preferences/ConfigurationPages/ProjectBrowserPage.py	Fri Jan 07 15:52:50 2011 +0100
@@ -132,7 +132,7 @@
         @param index index of the selected project type (integer)
         """
         if self.__currentProjectTypeIndex == index:
-           return
+            return
         
         self.__storeProjectBrowserFlags(
             self.projectTypeCombo.itemData(self.__currentProjectTypeIndex))
@@ -147,4 +147,4 @@
     @param dlg reference to the configuration dialog
     """
     page = ProjectBrowserPage()
-    return page
\ No newline at end of file
+    return page
--- a/Project/ProjectFormsBrowser.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/Project/ProjectFormsBrowser.py	Fri Jan 07 15:52:50 2011 +0100
@@ -267,7 +267,7 @@
                 self.__compileAllForms)
             self.dirMultiMenu.addSeparator()
         else:
-           if self.hooks["compileAllForms"] is not None:
+            if self.hooks["compileAllForms"] is not None:
                 self.dirMultiMenu.addAction(
                     self.hooksMenuEntries.get("compileAllForms", 
                         self.trUtf8('Compile all forms')), 
--- a/Project/ProjectResourcesBrowser.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/Project/ProjectResourcesBrowser.py	Fri Jan 07 15:52:50 2011 +0100
@@ -718,7 +718,7 @@
                     rfile = os.path.join(self.project.ppath, rfile)
                 if os.path.exists(rfile) and \
                    os.stat(rfile).st_mtime > mtime:
-                       return True
+                    return True
                 
                 lbuf = ""
         
--- a/QScintilla/Editor.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/QScintilla/Editor.py	Fri Jan 07 15:52:50 2011 +0100
@@ -5963,7 +5963,7 @@
             self.setCursorPosition(*cur)
             
             while self.__receivedWhileSyncing:
-               command = self.__receivedWhileSyncing.pop(0) 
-               self.__dispatchCommand(command)
+                command = self.__receivedWhileSyncing.pop(0) 
+                self.__dispatchCommand(command)
             
             self.__isSyncing = False
--- a/QScintilla/Lexers/LexerPython.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/QScintilla/Lexers/LexerPython.py	Fri Jan 07 15:52:50 2011 +0100
@@ -51,7 +51,7 @@
         self.setFoldComments(Preferences.getEditor("PythonFoldComment"))
         self.setFoldQuotes(Preferences.getEditor("PythonFoldString"))
         if not Preferences.getEditor("PythonAutoIndent"):
-           self.setAutoIndentStyle(QsciScintilla.AiMaintain)
+            self.setAutoIndentStyle(QsciScintilla.AiMaintain)
         try:
             self.setV2UnicodeAllowed(Preferences.getEditor("PythonAllowV2Unicode"))
             self.setV3BinaryOctalAllowed(Preferences.getEditor("PythonAllowV3Binary"))
--- a/QScintilla/MiniEditor.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/QScintilla/MiniEditor.py	Fri Jan 07 15:52:50 2011 +0100
@@ -523,8 +523,8 @@
         self.deleteAct.triggered[()].connect(self.__textEdit.clear)
         self.editActions.append(self.deleteAct)
         
-        self.cutAct.setEnabled(False);
-        self.copyAct.setEnabled(False);
+        self.cutAct.setEnabled(False)
+        self.copyAct.setEnabled(False)
         self.__textEdit.copyAvailable.connect(self.cutAct.setEnabled)
         self.__textEdit.copyAvailable.connect(self.copyAct.setEnabled)
         
@@ -1359,7 +1359,7 @@
         self.fileMenu.addSeparator()
         self.fileMenu.addAction(self.closeAct)
         
-        self.editMenu = self.menuBar().addMenu(self.trUtf8("&Edit"));
+        self.editMenu = self.menuBar().addMenu(self.trUtf8("&Edit"))
         self.editMenu.addAction(self.undoAct)
         self.editMenu.addAction(self.redoAct)
         self.editMenu.addSeparator()
--- a/QScintilla/QsciScintillaCompat.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/QScintilla/QsciScintillaCompat.py	Fri Jan 07 15:52:50 2011 +0100
@@ -903,29 +903,29 @@
             
             if style == self.ArrowFoldStyle:
                 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDER, 
-                                     QsciScintilla.SC_MARK_ARROW);
+                                     QsciScintilla.SC_MARK_ARROW)
                 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDEROPEN, 
-                                     QsciScintilla.SC_MARK_ARROWDOWN);
-                self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDERSUB);
-                self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDERTAIL);
-                self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDEREND);
-                self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDEROPENMID);
-                self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDERMIDTAIL);
+                                     QsciScintilla.SC_MARK_ARROWDOWN)
+                self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDERSUB)
+                self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDERTAIL)
+                self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDEREND)
+                self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDEROPENMID)
+                self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDERMIDTAIL)
             elif style == self.ArrowTreeFoldStyle:
                 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDER, 
-                                     QsciScintilla.SC_MARK_ARROW);
+                                     QsciScintilla.SC_MARK_ARROW)
                 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDEROPEN, 
-                                     QsciScintilla.SC_MARK_ARROWDOWN);
+                                     QsciScintilla.SC_MARK_ARROWDOWN)
                 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDERSUB, 
-                                     QsciScintilla.SC_MARK_VLINE);
+                                     QsciScintilla.SC_MARK_VLINE)
                 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDERTAIL, 
-                                     QsciScintilla.SC_MARK_LCORNER);
+                                     QsciScintilla.SC_MARK_LCORNER)
                 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDEREND, 
-                                     QsciScintilla.SC_MARK_ARROW);
+                                     QsciScintilla.SC_MARK_ARROW)
                 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDEROPENMID, 
-                                     QsciScintilla.SC_MARK_ARROWDOWN);
+                                     QsciScintilla.SC_MARK_ARROWDOWN)
                 self.__setFoldMarker(QsciScintilla.SC_MARKNUM_FOLDERMIDTAIL, 
-                                     QsciScintilla.SC_MARK_TCORNER);
+                                     QsciScintilla.SC_MARK_TCORNER)
     
     def setFoldMarkersColors(self, foreColor, backColor):
         """
--- a/QScintilla/Shell.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/QScintilla/Shell.py	Fri Jan 07 15:52:50 2011 +0100
@@ -1114,7 +1114,8 @@
                     cmd = ''
             
             self.dbs.remoteStatement(cmd)
-            while self.inCommandExecution: QApplication.processEvents()
+            while self.inCommandExecution:
+                QApplication.processEvents()
         else:
             if not self.echoInput:
                 cmd = self.buff
--- a/ViewManager/ViewManager.py	Fri Jan 07 12:38:39 2011 +0100
+++ b/ViewManager/ViewManager.py	Fri Jan 07 15:52:50 2011 +0100
@@ -4533,7 +4533,8 @@
         
         # remove all split views, if this is supported
         if self.canSplit():
-            while self.removeSplit(): pass
+            while self.removeSplit():
+                pass
         
         # stop the autosave timer
         if self.autosaveTimer.isActive():

eric ide

mercurial