PluginProjectPyramid.py

changeset 19
f4adfe6e51b0
parent 13
227a115ab2a1
child 21
e58828e9a847
--- a/PluginProjectPyramid.py	Thu Aug 30 15:36:06 2012 +0200
+++ b/PluginProjectPyramid.py	Thu Aug 30 17:18:56 2012 +0200
@@ -42,6 +42,7 @@
 
 pyramidPluginObject = None
 
+
 def createPyramidPage(configDlg):
     """
     Module function to create the Pyramid configuration page.
@@ -53,6 +54,7 @@
     page = PyramidPage(pyramidPluginObject)
     return page
     
+
 def getConfigData():
     """
     Module function returning data as required by the configuration dialog.
@@ -61,15 +63,16 @@
     """
     if e5App().getObject("UserInterface").versionIsNewer('5.0.99', '20120101'):
         return {
-            "pyramidPage" : \
-                [QCoreApplication.translate("ProjectPyramidPlugin", "Pyramid"), 
-                 os.path.join("ProjectPyramid", "icons", 
+            "pyramidPage": \
+                [QCoreApplication.translate("ProjectPyramidPlugin", "Pyramid"),
+                 os.path.join("ProjectPyramid", "icons",
                               "pyramid.png"),
                  createPyramidPage, None, None],
         }
     else:
         return {}
 
+
 def apiFiles(language):
     """
     Module function to return the API files made available by this plugin.
@@ -84,6 +87,7 @@
         apis = []
     return apis
 
+
 def prepareUninstall():
     """
     Module function to prepare for an uninstallation.
@@ -97,11 +101,11 @@
     Class implementing the Pyramid project plugin.
     """
     lexerAssociations = {
-        "*.mako": "Pygments|HTML+Mako", 
-        "*.pt": "Pygments|HTML+Genshi", 
-        "*.txt": "Pygments|Genshi", 
-        "*.html": "Pygments|HTML+Genshi", 
-        "*.htm": "Pygments|HTML+Genshi", 
+        "*.mako": "Pygments|HTML+Mako",
+        "*.pt": "Pygments|HTML+Genshi",
+        "*.txt": "Pygments|Genshi",
+        "*.html": "Pygments|HTML+Genshi",
+        "*.htm": "Pygments|HTML+Genshi",
     }
     
     def __init__(self, ui):
@@ -115,11 +119,11 @@
         self.__initialize()
         
         self.__defaults = {
-            "VirtualEnvironmentPy2" : "", 
-            "VirtualEnvironmentPy3" : "", 
-            "Python2ConsoleType": "python", 
-            "Python3ConsoleType": "python", 
-            "PyramidDocUrl": "http://docs.pylonsproject.org/en/latest/docs/pyramid.html", 
+            "VirtualEnvironmentPy2": "",
+            "VirtualEnvironmentPy3": "",
+            "Python2ConsoleType": "python",
+            "Python3ConsoleType": "python",
+            "PyramidDocUrl": "http://docs.pylonsproject.org/en/latest/docs/pyramid.html",
         }
         if isWindowsPlatform():
             self.__defaults["ConsoleCommandNoClose"] = "cmd.exe /k"
@@ -180,11 +184,11 @@
         
         self.__mainMenu = self.__object.initMenu()
         
-        self.__e5project.registerProjectType("Pyramid", self.trUtf8("Pyramid"), 
-            self.fileTypesCallback, 
-            lexerAssociationCallback = self.lexerAssociationCallback, 
-            binaryTranslationsCallback = self.binaryTranslationsCallback)
-        Preferences.setProjectBrowserFlagsDefault("Pyramid", 
+        self.__e5project.registerProjectType("Pyramid", self.trUtf8("Pyramid"),
+            self.fileTypesCallback,
+            lexerAssociationCallback=self.lexerAssociationCallback,
+            binaryTranslationsCallback=self.binaryTranslationsCallback)
+        Preferences.setProjectBrowserFlagsDefault("Pyramid",
             SourcesBrowserFlag | \
             FormsBrowserFlag | \
             TranslationsBrowserFlag | \
@@ -279,15 +283,15 @@
         """
         if self.__e5project.getProjectType() == "Pyramid":
             fileTypes = {
-                "*.mako": "FORMS", 
-                "*.mak": "FORMS", 
-                "*.pt": "FORMS", 
-                "*.html": "FORMS", 
-                "*.htm": "FORMS", 
+                "*.mako": "FORMS",
+                "*.mak": "FORMS",
+                "*.pt": "FORMS",
+                "*.html": "FORMS",
+                "*.htm": "FORMS",
                 "*.js": "SOURCES",
-                "*.pot": "TRANSLATIONS", 
-                "*.po": "TRANSLATIONS", 
-                "*.mo": "TRANSLATIONS", 
+                "*.pot": "TRANSLATIONS",
+                "*.po": "TRANSLATIONS",
+                "*.mo": "TRANSLATIONS",
             }
         else:
             fileTypes = {}

eric ide

mercurial