Fixed a few PEP-8 related issues. Py2 comp.

Mon, 25 Mar 2013 10:24:44 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 25 Mar 2013 10:24:44 +0100
branch
Py2 comp.
changeset 2538
b2642e7a4c18
parent 2533
8fb5922867f2
child 2541
1ffa9f2f1be5

Fixed a few PEP-8 related issues.

DocumentationTools/APIGenerator.py file | annotate | diff | comparison | revisions
E5Network/E5SslInfoWidget.py file | annotate | diff | comparison | revisions
Graphics/GraphicsUtilities.py file | annotate | diff | comparison | revisions
Helpviewer/SpeedDial/Page.py file | annotate | diff | comparison | revisions
Helpviewer/WebPlugins/WebPluginInterface.py file | annotate | diff | comparison | revisions
PluginManager/PluginInstallDialog.py file | annotate | diff | comparison | revisions
Preferences/__init__.py file | annotate | diff | comparison | revisions
Project/Project.py file | annotate | diff | comparison | revisions
QScintilla/QsciScintillaCompat.py file | annotate | diff | comparison | revisions
QScintilla/TypingCompleters/__init__.py file | annotate | diff | comparison | revisions
UI/Previewer.py file | annotate | diff | comparison | revisions
UI/SymbolsWidget.py file | annotate | diff | comparison | revisions
Utilities/ClassBrowsers/ClbrBaseClasses.py file | annotate | diff | comparison | revisions
eric5.py file | annotate | diff | comparison | revisions
eric5_api.py file | annotate | diff | comparison | revisions
eric5_compare.py file | annotate | diff | comparison | revisions
eric5_configure.py file | annotate | diff | comparison | revisions
eric5_diff.py file | annotate | diff | comparison | revisions
eric5_doc.py file | annotate | diff | comparison | revisions
eric5_editor.py file | annotate | diff | comparison | revisions
eric5_iconeditor.py file | annotate | diff | comparison | revisions
eric5_plugininstall.py file | annotate | diff | comparison | revisions
eric5_pluginrepository.py file | annotate | diff | comparison | revisions
eric5_pluginuninstall.py file | annotate | diff | comparison | revisions
eric5_qregexp.py file | annotate | diff | comparison | revisions
eric5_re.py file | annotate | diff | comparison | revisions
eric5_snap.py file | annotate | diff | comparison | revisions
eric5_sqlbrowser.py file | annotate | diff | comparison | revisions
eric5_tray.py file | annotate | diff | comparison | revisions
eric5_trpreviewer.py file | annotate | diff | comparison | revisions
eric5_uipreviewer.py file | annotate | diff | comparison | revisions
eric5_unittest.py file | annotate | diff | comparison | revisions
eric5_webbrowser.py file | annotate | diff | comparison | revisions
--- a/DocumentationTools/APIGenerator.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/DocumentationTools/APIGenerator.py	Mon Mar 25 10:24:44 2013 +0100
@@ -11,6 +11,7 @@
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
 
+
 class APIGenerator(object):
     """
     Class implementing the builtin documentation generator.
--- a/E5Network/E5SslInfoWidget.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/E5Network/E5SslInfoWidget.py	Mon Mar 25 10:24:44 2013 +0100
@@ -90,7 +90,7 @@
             
             label = QLabel(self)
             label.setWordWrap(True)
-            label.setText('<a href="moresslinfos">' + 
+            label.setText('<a href="moresslinfos">' +
                 self.trUtf8("Certificate Information") + "</a>")
             label.linkActivated.connect(self.__showCertificateInfos)
             layout.addWidget(label, rows, 1)
--- a/Graphics/GraphicsUtilities.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/Graphics/GraphicsUtilities.py	Mon Mar 25 10:24:44 2013 +0100
@@ -10,6 +10,7 @@
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
 
+
 class RecursionError(OverflowError, ValueError):
     """
     Unable to calculate result because of recursive structure.
--- a/Helpviewer/SpeedDial/Page.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/Helpviewer/SpeedDial/Page.py	Mon Mar 25 10:24:44 2013 +0100
@@ -10,6 +10,7 @@
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
 
+
 class Page(object):
     """
     Class to hold the data for a speed dial page.
--- a/Helpviewer/WebPlugins/WebPluginInterface.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/Helpviewer/WebPlugins/WebPluginInterface.py	Mon Mar 25 10:24:44 2013 +0100
@@ -10,6 +10,7 @@
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
 
+
 class WebPluginInterface(object):
     """
     Class implementing the web plug-in interface.
--- a/PluginManager/PluginInstallDialog.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/PluginManager/PluginInstallDialog.py	Mon Mar 25 10:24:44 2013 +0100
@@ -14,7 +14,7 @@
 import shutil
 import zipfile
 import compileall
-try: #Py3
+try:  # Py3
     import urllib.parse as parse
 except (ImportError):
     import urlparse as parse
--- a/Preferences/__init__.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/Preferences/__init__.py	Mon Mar 25 10:24:44 2013 +0100
@@ -124,7 +124,7 @@
         "TabViewManagerFilenameOnly": True,
         "ShowFilePreview": True,
         "ShowFilePreviewJS": True,
-        "ShowFilePreviewSSI": True, 
+        "ShowFilePreviewSSI": True,
         # the order in ViewProfiles is Project-Viewer, File-Browser,
         # Debug-Viewer, Python-Shell, Log-Viewer, Task-Viewer,
         # Templates-Viewer, Multiproject-Viewer, Terminal, Chat, Symbols,
--- a/Project/Project.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/Project/Project.py	Mon Mar 25 10:24:44 2013 +0100
@@ -4285,7 +4285,7 @@
                 newline = self.getEolString()
             pkglistFile = open(pkglist, "w", encoding="utf-8", newline=newline)
             pkglistFile.write("\n".join(lst))
-            pkglistFile.write("\n") # ensure the file ends with an empty line
+            pkglistFile.write("\n")  # ensure the file ends with an empty line
             pkglistFile.close()
         except IOError as why:
             E5MessageBox.critical(self.ui,
--- a/QScintilla/QsciScintillaCompat.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/QScintilla/QsciScintillaCompat.py	Mon Mar 25 10:24:44 2013 +0100
@@ -116,9 +116,9 @@
         for style in rangeLow + rangeHigh:
             self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, style, f)
             self.SendScintilla(QsciScintilla.SCI_STYLESETSIZE, style, ps)
-            self.SendScintilla(QsciScintilla.SCI_STYLESETWEIGHT, style, weight);
-            self.SendScintilla(QsciScintilla.SCI_STYLESETITALIC, style, italic);
-            self.SendScintilla(QsciScintilla.SCI_STYLESETUNDERLINE, style, underline);
+            self.SendScintilla(QsciScintilla.SCI_STYLESETWEIGHT, style, weight)
+            self.SendScintilla(QsciScintilla.SCI_STYLESETITALIC, style, italic)
+            self.SendScintilla(QsciScintilla.SCI_STYLESETUNDERLINE, style, underline)
     
     def linesOnScreen(self):
         """
--- a/QScintilla/TypingCompleters/__init__.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/QScintilla/TypingCompleters/__init__.py	Mon Mar 25 10:24:44 2013 +0100
@@ -10,6 +10,7 @@
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
 
+
 def getCompleter(language, editor, parent=None):
     """
     Module function to instantiate a lexer object for a given language.
--- a/UI/Previewer.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/UI/Previewer.py	Mon Mar 25 10:24:44 2013 +0100
@@ -275,7 +275,7 @@
         """
         frame = self.previewView.page().mainFrame()
         if frame.contentsSize() == QSize(0, 0):
-            return # no valid data, nothing to save
+            return  # no valid data, nothing to save
         
         pos = frame.scrollPosition()
         self.__scrollBarPositions[self.__previewedPath] = pos
@@ -319,7 +319,7 @@
 
 class PreviewProcessingThread(QThread):
     """
-    Class implementing a thread to process some text into HTML usable by the 
+    Class implementing a thread to process some text into HTML usable by the
     previewer view.
     
     @signal htmlReady(str,str) emitted with the file name and processed HTML to signal
@@ -502,6 +502,7 @@
                 this page for details</a>)
                 """
                 DEL_RE = r'(~~)(.*?)~~'
+
                 def extendMarkdown(self, md, md_globals):
                     # Create the del pattern
                     del_tag = markdown.inlinepatterns.SimpleTagPattern(self.DEL_RE, 'del')
@@ -512,7 +513,7 @@
 
         try:
             return markdown.markdown(text,  extensions + ['mathjax'])
-        except (ImportError, ValueError): 
+        except (ImportError, ValueError):
             # markdown raises ValueError or ImportError, depends on version
             # It is not clear, how to distinguish missing mathjax from other errors.
             # So keep going without mathjax.
--- a/UI/SymbolsWidget.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/UI/SymbolsWidget.py	Mon Mar 25 10:24:44 2013 +0100
@@ -10,7 +10,7 @@
 from __future__ import unicode_literals    # __IGNORE_WARNING__
 
 import unicodedata
-try: # Py3
+try:  # Py3
     import html.entities as html_entities
 except (ImportError):
     chr = unichr
--- a/Utilities/ClassBrowsers/ClbrBaseClasses.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/Utilities/ClassBrowsers/ClbrBaseClasses.py	Mon Mar 25 10:24:44 2013 +0100
@@ -10,6 +10,7 @@
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
 
+
 class _ClbrBase(object):
     """
     Class implementing the base of all class browser objects.
--- a/eric5.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
 
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_api.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_api.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_compare.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_compare.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_configure.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_configure.py	Mon Mar 25 10:24:44 2013 +0100
@@ -11,7 +11,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_diff.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_diff.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_doc.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_doc.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_editor.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_editor.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_iconeditor.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_iconeditor.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_plugininstall.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_plugininstall.py	Mon Mar 25 10:24:44 2013 +0100
@@ -11,7 +11,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_pluginrepository.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_pluginrepository.py	Mon Mar 25 10:24:44 2013 +0100
@@ -11,7 +11,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_pluginuninstall.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_pluginuninstall.py	Mon Mar 25 10:24:44 2013 +0100
@@ -11,7 +11,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_qregexp.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_qregexp.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_re.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_re.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_snap.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_snap.py	Mon Mar 25 10:24:44 2013 +0100
@@ -12,7 +12,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_sqlbrowser.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_sqlbrowser.py	Mon Mar 25 10:24:44 2013 +0100
@@ -12,7 +12,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_tray.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_tray.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_trpreviewer.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_trpreviewer.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_uipreviewer.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_uipreviewer.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_unittest.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_unittest.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)
--- a/eric5_webbrowser.py	Mon Mar 25 10:08:52 2013 +0100
+++ b/eric5_webbrowser.py	Mon Mar 25 10:24:44 2013 +0100
@@ -13,7 +13,7 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
-try: # Only for Py2
+try:  # Only for Py2
     import sip
     sip.setapi('QString', 2)
     sip.setapi('QVariant', 2)

eric ide

mercurial