Fixed a few PEP-8 issues.

Sun, 17 Apr 2011 19:07:20 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 17 Apr 2011 19:07:20 +0200
changeset 992
566e87428fc8
parent 991
5ec5e707dfa5
child 993
03493183dd91

Fixed a few PEP-8 issues.

Helpviewer/AdBlock/AdBlockManager.py file | annotate | diff | comparison | revisions
Helpviewer/Download/DownloadAskActionDialog.py file | annotate | diff | comparison | revisions
Helpviewer/HelpBrowserWV.py file | annotate | diff | comparison | revisions
Helpviewer/HelpWindow.py file | annotate | diff | comparison | revisions
Helpviewer/VirusTotalApi.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py file | annotate | diff | comparison | revisions
Preferences/ConfigurationPages/HelpVirusTotalPage.py file | annotate | diff | comparison | revisions
Preferences/__init__.py file | annotate | diff | comparison | revisions
QScintilla/Lexers/__init__.py file | annotate | diff | comparison | revisions
Tasks/TaskViewer.py file | annotate | diff | comparison | revisions
--- a/Helpviewer/AdBlock/AdBlockManager.py	Sun Apr 17 18:43:02 2011 +0200
+++ b/Helpviewer/AdBlock/AdBlockManager.py	Sun Apr 17 19:07:20 2011 +0200
@@ -232,7 +232,7 @@
             subscriptions = defaultSubscriptions
         for subscription in subscriptions:
             url = QUrl.fromEncoded(subscription.encode())
-            adBlockSubscription = AdBlockSubscription(url, self, 
+            adBlockSubscription = AdBlockSubscription(url, self,
                 subscription == defaultSubscriptionUrl)
             adBlockSubscription.rulesChanged.connect(self.rulesChanged)
             adBlockSubscription.changed.connect(self.rulesChanged)
--- a/Helpviewer/Download/DownloadAskActionDialog.py	Sun Apr 17 18:43:02 2011 +0200
+++ b/Helpviewer/Download/DownloadAskActionDialog.py	Sun Apr 17 19:07:20 2011 +0200
@@ -13,6 +13,7 @@
 
 import Preferences
 
+
 class DownloadAskActionDialog(QDialog, Ui_DownloadAskActionDialog):
     """
     Class implementing a dialog to ask for a download action.
--- a/Helpviewer/HelpBrowserWV.py	Sun Apr 17 18:43:02 2011 +0200
+++ b/Helpviewer/HelpBrowserWV.py	Sun Apr 17 19:07:20 2011 +0200
@@ -807,7 +807,7 @@
             menu.addAction(self.trUtf8("Copy Link to Clipboard"), self.__copyLink)
             if Preferences.getHelp("VirusTotalEnabled") and \
                Preferences.getHelp("VirusTotalServiceKey") != "":
-                act = menu.addAction(UI.PixmapCache.getIcon("virustotal.png"), 
+                act = menu.addAction(UI.PixmapCache.getIcon("virustotal.png"),
                     self.trUtf8("Scan Link with VirusTotal"), self.__virusTotal)
                 act.setData(hit.linkUrl())
         
@@ -828,7 +828,7 @@
             act.setData(hit.imageUrl().toString())
             if Preferences.getHelp("VirusTotalEnabled") and \
                Preferences.getHelp("VirusTotalServiceKey") != "":
-                act = menu.addAction(UI.PixmapCache.getIcon("virustotal.png"), 
+                act = menu.addAction(UI.PixmapCache.getIcon("virustotal.png"),
                     self.trUtf8("Scan Image with VirusTotal"), self.__virusTotal)
                 act.setData(hit.imageUrl())
         
@@ -1478,10 +1478,10 @@
             while frame and frame != self.page().mainFrame():
                 p -= frame.scrollPosition()
                 frame = frame.parentFrame()
-            pevent = QMouseEvent(QEvent.MouseButtonPress, p, Qt.LeftButton, 
+            pevent = QMouseEvent(QEvent.MouseButtonPress, p, Qt.LeftButton,
                 Qt.MouseButtons(Qt.NoButton), Qt.KeyboardModifiers(Qt.NoModifier))
             qApp.sendEvent(self, pevent)
-            revent = QMouseEvent(QEvent.MouseButtonRelease, p, Qt.LeftButton, 
+            revent = QMouseEvent(QEvent.MouseButtonRelease, p, Qt.LeftButton,
                 Qt.MouseButtons(Qt.NoButton), Qt.KeyboardModifiers(Qt.NoModifier))
             qApp.sendEvent(self, revent)
             handled = True
@@ -1505,12 +1505,12 @@
         Private method to show the access key labels.
         """
         supportedElements = [
-            "input", "a", "area", "button", "label", "legend", "textarea", 
+            "input", "a", "area", "button", "label", "legend", "textarea",
         ]
         unusedKeys = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z" \
             " 0 1 2 3 4 5 6 7 8 9".split()
         
-        viewport = QRect(self.__page.mainFrame().scrollPosition(), 
+        viewport = QRect(self.__page.mainFrame().scrollPosition(),
                          self.__page.viewportSize())
         # Priority first goes to elements with accesskey attributes
         alreadyLabeled = []
--- a/Helpviewer/HelpWindow.py	Sun Apr 17 18:43:02 2011 +0200
+++ b/Helpviewer/HelpWindow.py	Sun Apr 17 19:07:20 2011 +0200
@@ -1416,7 +1416,7 @@
             """<li>impropagating</li>"""
             """<li>networkworm</li>"""
             """<li>drivebydownload</li>"""
-            """</ul>""", 
+            """</ul>""",
             """<ul>"""
             """<li>malicious</li>"""
             """<li>benign</li>"""
@@ -1424,7 +1424,7 @@
             """<li>phishingsite</li>"""
             """<li>browserexploit</li>"""
             """<li>spamlink</li>"""
-            """</ul>""", 
+            """</ul>""",
         ))
         self.virustotalSearchEdit.textChanged.connect(self.__virusTotalSearchChanged)
         self.virustotalSearchEdit.returnPressed.connect(self.__virusTotalSearch)
--- a/Helpviewer/VirusTotalApi.py	Sun Apr 17 18:43:02 2011 +0200
+++ b/Helpviewer/VirusTotalApi.py	Sun Apr 17 19:07:20 2011 +0200
@@ -16,6 +16,7 @@
 
 import Preferences
 
+
 class VirusTotalAPI(QObject):
     """
     Class implementing the <a href="http://www.virustotal.com">VirusTotal</a> API.
@@ -24,7 +25,7 @@
             has been performed. It gives a flag indicating validity (boolean) and
             an error message in case of a network error (string).
     @signal submitUrlError(str) emitted with the error string, if the URL scan
-            submission returned an error. 
+            submission returned an error.
     @signal urlScanReport(str) emitted with the URL of the URL scan report page
     @signal fileScanReport(str) emitted with the URL of the file scan report page
     """
--- a/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py	Sun Apr 17 18:43:02 2011 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py	Sun Apr 17 19:07:20 2011 +0200
@@ -429,7 +429,7 @@
         self.hgBranchAct.triggered[()].connect(self.__hgBranch)
         self.actions.append(self.hgBranchAct)
         
-        self.hgPushBranchAct = E5Action(self.trUtf8('Push new branch'), 
+        self.hgPushBranchAct = E5Action(self.trUtf8('Push new branch'),
                 self.trUtf8('Push new branch'),
                 0, 0, self, 'mercurial_push_branch')
         self.hgPushBranchAct.setStatusTip(self.trUtf8(
@@ -988,7 +988,7 @@
         """
         Private slot to push a new named branch.
         """
-        self.vcs.hgPush(self.project.ppath, newBranch = True)
+        self.vcs.hgPush(self.project.ppath, newBranch=True)
     
     def __hgEditRepoConfig(self):
         """
--- a/Preferences/ConfigurationPages/HelpVirusTotalPage.py	Sun Apr 17 18:43:02 2011 +0200
+++ b/Preferences/ConfigurationPages/HelpVirusTotalPage.py	Sun Apr 17 19:07:20 2011 +0200
@@ -21,7 +21,7 @@
     """
     Class documentation goes here.
     """
-    def __init__(self, parent = None):
+    def __init__(self, parent=None):
         """
         Constructor
         
@@ -49,11 +49,11 @@
         """
         Public slot to save the VirusTotal configuration.
         """
-        Preferences.setHelp("VirusTotalEnabled", 
+        Preferences.setHelp("VirusTotalEnabled",
             self.vtEnabledCheckBox.isChecked())
-        Preferences.setHelp("VirusTotalSecure", 
+        Preferences.setHelp("VirusTotalSecure",
             self.vtSecureCheckBox.isChecked())
-        Preferences.setHelp("VirusTotalServiceKey", 
+        Preferences.setHelp("VirusTotalServiceKey",
             self.vtServiceKeyEdit.text())
     
     @pyqtSlot(str)
--- a/Preferences/__init__.py	Sun Apr 17 18:43:02 2011 +0200
+++ b/Preferences/__init__.py	Sun Apr 17 19:07:20 2011 +0200
@@ -318,7 +318,7 @@
         "CppIndentOpeningBrace": False,
         "CppIndentClosingBrace": False,
         "CppDollarsAllowed": True,
-        "CppStylePreprocessor": False, 
+        "CppStylePreprocessor": False,
         
         # CSS specifics
         "CssFoldComment": True,
@@ -335,7 +335,7 @@
         "HtmlFoldScriptHeredocs": False,
         "HtmlCaseSensitiveTags": False,
         "HtmlDjangoTemplates": False,
-        "HtmlMakoTemplates": False, 
+        "HtmlMakoTemplates": False,
         
         # Pascal specifics
         "PascalFoldComment": True,
@@ -357,7 +357,7 @@
         "PovFoldDirectives": False,
         
         # Properties specifics
-        "PropertiesInitialSpaces": True, 
+        "PropertiesInitialSpaces": True,
         
         # Python specifics
         "PythonBadIndentation": True,
--- a/QScintilla/Lexers/__init__.py	Sun Apr 17 18:43:02 2011 +0200
+++ b/QScintilla/Lexers/__init__.py	Sun Apr 17 19:07:20 2011 +0200
@@ -70,36 +70,36 @@
         (string, string)
     """
     supportedLanguages = {
-        "Bash": [QApplication.translate('Lexers', "Bash"),         'dummy.sh'],
-        "Batch": [QApplication.translate('Lexers', "Batch"),        'dummy.bat'],
-        "C++": [QApplication.translate('Lexers', "C/C++"),        'dummy.cpp'],
-        "C#": [QApplication.translate('Lexers', "C#"),           'dummy.cs'],
-        "CMake": [QApplication.translate('Lexers', "CMake"),        'dummy.cmake'],
-        "CSS": [QApplication.translate('Lexers', "CSS"),          'dummy.css'],
-        "D": [QApplication.translate('Lexers', "D"),            'dummy.d'],
-        "Diff": [QApplication.translate('Lexers', "Diff"),         'dummy.diff'],
-        "Fortran": [QApplication.translate('Lexers', "Fortran"),      'dummy.f95'],
-        "Fortran77": [QApplication.translate('Lexers', "Fortran77"),    'dummy.f'],
+        "Bash": [QApplication.translate('Lexers', "Bash"), 'dummy.sh'],
+        "Batch": [QApplication.translate('Lexers', "Batch"), 'dummy.bat'],
+        "C++": [QApplication.translate('Lexers', "C/C++"), 'dummy.cpp'],
+        "C#": [QApplication.translate('Lexers', "C#"), 'dummy.cs'],
+        "CMake": [QApplication.translate('Lexers', "CMake"), 'dummy.cmake'],
+        "CSS": [QApplication.translate('Lexers', "CSS"), 'dummy.css'],
+        "D": [QApplication.translate('Lexers', "D"), 'dummy.d'],
+        "Diff": [QApplication.translate('Lexers', "Diff"), 'dummy.diff'],
+        "Fortran": [QApplication.translate('Lexers', "Fortran"), 'dummy.f95'],
+        "Fortran77": [QApplication.translate('Lexers', "Fortran77"), 'dummy.f'],
         "HTML": [QApplication.translate('Lexers', "HTML/PHP/XML"), 'dummy.html'],
-        "IDL": [QApplication.translate('Lexers', "IDL"),          'dummy.idl'],
-        "Java": [QApplication.translate('Lexers', "Java"),         'dummy.java'],
-        "JavaScript": [QApplication.translate('Lexers', "JavaScript"),   'dummy.js'],
-        "Lua": [QApplication.translate('Lexers', "Lua"),          'dummy.lua'],
-        "Makefile": [QApplication.translate('Lexers', "Makefile"),     'dummy.mak'],
-        "Pascal": [QApplication.translate('Lexers', "Pascal"),       'dummy.pas'],
-        "Perl": [QApplication.translate('Lexers', "Perl"),         'dummy.pl'],
-        "PostScript": [QApplication.translate('Lexers', "PostScript"),   'dummy.ps'],
-        "Povray": [QApplication.translate('Lexers', "Povray"),       'dummy.pov'],
-        "Properties": [QApplication.translate('Lexers', "Properties"),   'dummy.ini'],
-        "Python2": [QApplication.translate('Lexers', "Python2"),      'dummy.py'],
-        "Python3": [QApplication.translate('Lexers', "Python3"),      'dummy.py'],
-        "Ruby": [QApplication.translate('Lexers', "Ruby"),         'dummy.rb'],
-        "SQL": [QApplication.translate('Lexers', "SQL"),          'dummy.sql'],
-        "TCL": [QApplication.translate('Lexers', "TCL"),          'dummy.tcl'],
-        "TeX": [QApplication.translate('Lexers', "TeX"),          'dummy.tex'],
-        "VHDL": [QApplication.translate('Lexers', "VHDL"),         'dummy.vhd'],
-        "XML": [QApplication.translate('Lexers', "XML"),          'dummy.xml'],
-        "YAML": [QApplication.translate('Lexers', "YAML"),         'dummy.yml'],
+        "IDL": [QApplication.translate('Lexers', "IDL"), 'dummy.idl'],
+        "Java": [QApplication.translate('Lexers', "Java"), 'dummy.java'],
+        "JavaScript": [QApplication.translate('Lexers', "JavaScript"), 'dummy.js'],
+        "Lua": [QApplication.translate('Lexers', "Lua"), 'dummy.lua'],
+        "Makefile": [QApplication.translate('Lexers', "Makefile"), 'dummy.mak'],
+        "Pascal": [QApplication.translate('Lexers', "Pascal"), 'dummy.pas'],
+        "Perl": [QApplication.translate('Lexers', "Perl"), 'dummy.pl'],
+        "PostScript": [QApplication.translate('Lexers', "PostScript"), 'dummy.ps'],
+        "Povray": [QApplication.translate('Lexers', "Povray"), 'dummy.pov'],
+        "Properties": [QApplication.translate('Lexers', "Properties"), 'dummy.ini'],
+        "Python2": [QApplication.translate('Lexers', "Python2"), 'dummy.py'],
+        "Python3": [QApplication.translate('Lexers', "Python3"), 'dummy.py'],
+        "Ruby": [QApplication.translate('Lexers', "Ruby"), 'dummy.rb'],
+        "SQL": [QApplication.translate('Lexers', "SQL"), 'dummy.sql'],
+        "TCL": [QApplication.translate('Lexers', "TCL"), 'dummy.tcl'],
+        "TeX": [QApplication.translate('Lexers', "TeX"), 'dummy.tex'],
+        "VHDL": [QApplication.translate('Lexers', "VHDL"), 'dummy.vhd'],
+        "XML": [QApplication.translate('Lexers', "XML"), 'dummy.xml'],
+        "YAML": [QApplication.translate('Lexers', "YAML"), 'dummy.yml'],
     }
     
     for name in LexerRegistry:
--- a/Tasks/TaskViewer.py	Sun Apr 17 18:43:02 2011 +0200
+++ b/Tasks/TaskViewer.py	Sun Apr 17 19:07:20 2011 +0200
@@ -388,7 +388,7 @@
             self.__regenerateProjectTasks)
         self.__projectTasksMenu.addSeparator()
         self.__projectTasksMenu.addAction(
-            self.trUtf8("&Configure scan options"), 
+            self.trUtf8("&Configure scan options"),
             self.__configureProjectTasksScanOptions)
         
         self.__menu = QMenu(self)
@@ -769,7 +769,7 @@
             self.trUtf8("Scan Filter Patterns"),
             self.trUtf8("Enter filename patterns of files"
                         " to be excluded separated by a comma:"),
-            QLineEdit.Normal, 
+            QLineEdit.Normal,
             self.projectTasksScanFilter)
         if ok:
             self.projectTasksScanFilter = filter

eric ide

mercurial