Did some PEP-8 related corrections.

Mon, 30 Jan 2012 18:53:11 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 30 Jan 2012 18:53:11 +0100
changeset 1588
dccffd13be8d
parent 1587
714a3627a089
child 1590
823a26f767cb

Did some PEP-8 related corrections.

Graphics/PixmapDiagram.py file | annotate | diff | comparison | revisions
Graphics/SvgDiagram.py file | annotate | diff | comparison | revisions
Graphics/UMLGraphicsView.py file | annotate | diff | comparison | revisions
Helpviewer/HelpBrowserWV.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsPySvn/subversion.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsSubversion/subversion.py file | annotate | diff | comparison | revisions
Preferences/__init__.py file | annotate | diff | comparison | revisions
QScintilla/Editor.py file | annotate | diff | comparison | revisions
QScintilla/Shell.py file | annotate | diff | comparison | revisions
QScintilla/Terminal.py file | annotate | diff | comparison | revisions
--- a/Graphics/PixmapDiagram.py	Sun Jan 29 18:39:10 2012 +0100
+++ b/Graphics/PixmapDiagram.py	Mon Jan 30 18:53:11 2012 +0100
@@ -194,7 +194,7 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if evt.delta()< 0:
+            if evt.delta() < 0:
                 self.__zoomOut()
             else:
                 self.__zoomIn()
--- a/Graphics/SvgDiagram.py	Sun Jan 29 18:39:10 2012 +0100
+++ b/Graphics/SvgDiagram.py	Mon Jan 30 18:53:11 2012 +0100
@@ -165,7 +165,7 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if evt.delta()< 0:
+            if evt.delta() < 0:
                 self.__zoomOut()
             else:
                 self.__zoomIn()
--- a/Graphics/UMLGraphicsView.py	Sun Jan 29 18:39:10 2012 +0100
+++ b/Graphics/UMLGraphicsView.py	Mon Jan 30 18:53:11 2012 +0100
@@ -512,7 +512,7 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if evt.delta()< 0:
+            if evt.delta() < 0:
                 self.zoomOut()
             else:
                 self.zoomIn()
--- a/Helpviewer/HelpBrowserWV.py	Sun Jan 29 18:39:10 2012 +0100
+++ b/Helpviewer/HelpBrowserWV.py	Mon Jan 30 18:53:11 2012 +0100
@@ -956,7 +956,7 @@
                 langCode = language.split("[")[1][:2]
                 googleTranslatorUrl = QUrl(
                     "http://translate.google.com/#auto|{0}|{1}".format(
-                        langCode,self.selectedText()))
+                        langCode, self.selectedText()))
                 menu.addAction(UI.PixmapCache.getIcon("translate.png"),
                     self.trUtf8("Google Translate"), self.__openLinkInNewTab)\
                     .setData(googleTranslatorUrl)
--- a/Plugins/VcsPlugins/vcsPySvn/subversion.py	Sun Jan 29 18:39:10 2012 +0100
+++ b/Plugins/VcsPlugins/vcsPySvn/subversion.py	Mon Jan 30 18:53:11 2012 +0100
@@ -737,7 +737,7 @@
                         d = os.path.dirname(d)
                 else:
                     while not os.path.exists(os.path.join(d, self.adminDir)):
-                        # add directories recursively, 
+                        # add directories recursively,
                         # if they aren't in the repository already
                         if d in tree:
                             break
@@ -1300,7 +1300,7 @@
             return self.statusCache[name]
         
         name = os.path.normcase(name)
-        states = { name : 0 }
+        states = {name: 0}
         states = self.vcsAllRegisteredStates(states, dname, False)
         if states[name] == self.canBeCommitted:
             return self.canBeCommitted
@@ -1352,7 +1352,7 @@
         else:
             return self.__vcsAllRegisteredStates_wc(names, dname, shortcut)
         
-    def __vcsAllRegisteredStates_wcng(self, names, dname, shortcut = True):
+    def __vcsAllRegisteredStates_wcng(self, names, dname, shortcut=True):
         """
         Private method used to get the registered states of a number of files in the vcs.
         
@@ -1366,7 +1366,7 @@
         @param names dictionary with all filenames to be checked as keys
         @param dname directory to check in (string)
         @param shortcut flag indicating a shortcut should be taken (boolean)
-        @return the received dictionary completed with a combination of 
+        @return the received dictionary completed with a combination of
             canBeCommited and canBeAdded or None in order to signal an error
         """
         if dname.endswith(os.sep):
@@ -1397,8 +1397,8 @@
             
             try:
                 locker = QMutexLocker(self.vcsExecutionMutex)
-                allFiles = client.status(dname, recurse = True, get_all = True, 
-                                              ignore = True, update = False)
+                allFiles = client.status(dname, recurse=True, get_all=True,
+                                              ignore=True, update=False)
                 locker.unlock()
                 dirs = [x for x in names.keys() if os.path.isdir(x)]
                 for file in allFiles:
@@ -1429,7 +1429,7 @@
         
         return names
         
-    def __vcsAllRegisteredStates_wc(self, names, dname, shortcut = True):
+    def __vcsAllRegisteredStates_wc(self, names, dname, shortcut=True):
         """
         Private method used to get the registered states of a number of files in the vcs.
         
@@ -1443,7 +1443,7 @@
         @param names dictionary with all filenames to be checked as keys
         @param dname directory to check in (string)
         @param shortcut flag indicating a shortcut should be taken (boolean)
-        @return the received dictionary completed with a combination of 
+        @return the received dictionary completed with a combination of
             canBeCommited and canBeAdded or None in order to signal an error
         """
         if not os.path.isdir(os.path.join(dname, self.adminDir)):
--- a/Plugins/VcsPlugins/vcsSubversion/subversion.py	Sun Jan 29 18:39:10 2012 +0100
+++ b/Plugins/VcsPlugins/vcsSubversion/subversion.py	Mon Jan 30 18:53:11 2012 +0100
@@ -670,7 +670,7 @@
                         d = os.path.dirname(d)
                 else:
                     while not os.path.exists(os.path.join(d, self.adminDir)):
-                        # add directories recursively, 
+                        # add directories recursively,
                         # if they aren't in the repository already
                         if d in tree:
                             break
@@ -1132,7 +1132,7 @@
             return self.statusCache[name]
         
         name = os.path.normcase(name)
-        states = { name : 0 }
+        states = {name: 0}
         states = self.vcsAllRegisteredStates(states, dname, False)
         if states[name] == self.canBeCommitted:
             return self.canBeCommitted
@@ -1184,7 +1184,7 @@
         else:
             return self.__vcsAllRegisteredStates_wc(names, dname, shortcut)
         
-    def __vcsAllRegisteredStates_wcng(self, names, dname, shortcut = True):
+    def __vcsAllRegisteredStates_wcng(self, names, dname, shortcut=True):
         """
         Private method used to get the registered states of a number of files in the vcs.
         
@@ -1198,7 +1198,7 @@
         @param names dictionary with all filenames to be checked as keys
         @param dname directory to check in (string)
         @param shortcut flag indicating a shortcut should be taken (boolean)
-        @return the received dictionary completed with a combination of 
+        @return the received dictionary completed with a combination of
             canBeCommited and canBeAdded or None in order to signal an error
         """
         if dname.endswith(os.sep):
@@ -1252,7 +1252,7 @@
         
         return names
         
-    def __vcsAllRegisteredStates_wc(self, names, dname, shortcut = True):
+    def __vcsAllRegisteredStates_wc(self, names, dname, shortcut=True):
         """
         Private method used to get the registered states of a number of files in the vcs.
         
@@ -1266,7 +1266,7 @@
         @param names dictionary with all filenames to be checked as keys
         @param dname directory to check in (string)
         @param shortcut flag indicating a shortcut should be taken (boolean)
-        @return the received dictionary completed with a combination of 
+        @return the received dictionary completed with a combination of
             canBeCommited and canBeAdded or None in order to signal an error
         """
         if not os.path.isdir(os.path.join(dname, self.adminDir)):
--- a/Preferences/__init__.py	Sun Jan 29 18:39:10 2012 +0100
+++ b/Preferences/__init__.py	Mon Jan 30 18:53:11 2012 +0100
@@ -446,7 +446,7 @@
         "AnnotationsErrorBackground": QColor("#ffd0d0"),
         "WhitespaceForeground": QColor(Qt.darkGray),
         "WhitespaceBackground": QColor(Qt.white),
-        "EditAreaForeground": 
+        "EditAreaForeground":
             QApplication.palette().color(QPalette.Active, QPalette.Base),
         "EditAreaBackground":
             QApplication.palette().color(QPalette.Active, QPalette.Text),
--- a/QScintilla/Editor.py	Sun Jan 29 18:39:10 2012 +0100
+++ b/QScintilla/Editor.py	Mon Jan 30 18:53:11 2012 +0100
@@ -2938,13 +2938,13 @@
             begline = line
             while begline > 0 and \
                   self.text(begline - 1).strip().startswith(commentStr):
-                begline -=  1
+                begline -= 1
             # determine the end of the comment block
             endline = line
             lines = self.lines()
             while endline < lines and \
                   self.text(endline + 1).strip().startswith(commentStr):
-                endline +=  1
+                endline += 1
             
             self.setSelection(begline, 0, endline, self.lineLength(endline))
             self.uncommentLineOrSelection()
@@ -5415,7 +5415,7 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if evt.delta()< 0:
+            if evt.delta() < 0:
                 self.zoomOut()
             else:
                 self.zoomIn()
--- a/QScintilla/Shell.py	Sun Jan 29 18:39:10 2012 +0100
+++ b/QScintilla/Shell.py	Mon Jan 30 18:53:11 2012 +0100
@@ -740,7 +740,7 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if evt.delta()< 0:
+            if evt.delta() < 0:
                 self.zoomOut()
             else:
                 self.zoomIn()
--- a/QScintilla/Terminal.py	Sun Jan 29 18:39:10 2012 +0100
+++ b/QScintilla/Terminal.py	Mon Jan 30 18:53:11 2012 +0100
@@ -499,7 +499,7 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if evt.delta()< 0:
+            if evt.delta() < 0:
                 self.zoomOut()
             else:
                 self.zoomIn()
@@ -543,6 +543,7 @@
                     pinch.setScaleFactor(3.0)
                 self.zoomTo(zoom)
             evt.accept()
+
     def editorCommand(self, cmd):
         """
         Public method to perform an editor command.

eric ide

mercurial