Fixed code style issues. release-1.0.1

Thu, 24 Oct 2013 19:25:06 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 24 Oct 2013 19:25:06 +0200
changeset 11
a3a738778142
parent 10
ffbc3df63559
child 12
f59341511aa1

Fixed code style issues.

ChangeLog file | annotate | diff | comparison | revisions
PluginKivy.e4p file | annotate | diff | comparison | revisions
PluginProjectKivy.py file | annotate | diff | comparison | revisions
PluginProjectKivy.zip file | annotate | diff | comparison | revisions
ProjectKivy/Documentation/source/Plugin_Project_Kivy.PluginProjectKivy.html file | annotate | diff | comparison | revisions
ProjectKivy/KivyLexer.py file | annotate | diff | comparison | revisions
--- a/ChangeLog	Sat Sep 28 13:32:24 2013 +0200
+++ b/ChangeLog	Thu Oct 24 19:25:06 2013 +0200
@@ -1,5 +1,8 @@
 ChangeLog
 ---------
+Version 1.0.1
+- fixed code style issues
+
 Version 1.0.0
 - first formal release
 
--- a/PluginKivy.e4p	Sat Sep 28 13:32:24 2013 +0200
+++ b/PluginKivy.e4p	Thu Oct 24 19:25:06 2013 +0200
@@ -7,7 +7,7 @@
   <ProgLanguage mixed="0">Python3</ProgLanguage>
   <ProjectType>E4Plugin</ProjectType>
   <Description>A plug-in providing the 'Kivy' project type, syntax highlighter for Kivy files and  Kivy APIs.</Description>
-  <Version>0.1</Version>
+  <Version>1.0.x</Version>
   <Author>Detlev Offenbach</Author>
   <Email>detlev@die-offenbachs.de</Email>
   <TranslationPattern>ProjectKivy/i18n/kivy_%language%.ts</TranslationPattern>
@@ -224,4 +224,77 @@
       </dict>
     </DocumentationParams>
   </Documentation>
+  <Checkers>
+    <CheckersParams>
+      <dict>
+        <key>
+          <string>Pep8Checker</string>
+        </key>
+        <value>
+          <dict>
+            <key>
+              <string>DocstringType</string>
+            </key>
+            <value>
+              <string>eric</string>
+            </value>
+            <key>
+              <string>ExcludeFiles</string>
+            </key>
+            <value>
+              <string></string>
+            </value>
+            <key>
+              <string>ExcludeMessages</string>
+            </key>
+            <value>
+              <string>E24, W293, N802, N803, N807, N808, N821</string>
+            </value>
+            <key>
+              <string>FixCodes</string>
+            </key>
+            <value>
+              <string></string>
+            </value>
+            <key>
+              <string>FixIssues</string>
+            </key>
+            <value>
+              <bool>False</bool>
+            </value>
+            <key>
+              <string>HangClosing</string>
+            </key>
+            <value>
+              <bool>False</bool>
+            </value>
+            <key>
+              <string>IncludeMessages</string>
+            </key>
+            <value>
+              <string></string>
+            </value>
+            <key>
+              <string>MaxLineLength</string>
+            </key>
+            <value>
+              <int>79</int>
+            </value>
+            <key>
+              <string>NoFixCodes</string>
+            </key>
+            <value>
+              <string>E501</string>
+            </value>
+            <key>
+              <string>RepeatMessages</string>
+            </key>
+            <value>
+              <bool>True</bool>
+            </value>
+          </dict>
+        </value>
+      </dict>
+    </CheckersParams>
+  </Checkers>
 </Project>
--- a/PluginProjectKivy.py	Sat Sep 28 13:32:24 2013 +0200
+++ b/PluginProjectKivy.py	Thu Oct 24 19:25:06 2013 +0200
@@ -24,11 +24,12 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "1.0.0"
+version = "1.0.1"
 className = "ProjectKivyPlugin"
 packageName = "ProjectKivy"
 shortDescription = "Project support for Kivy projects."
-longDescription = """This plugin implements project support for Kivy projects."""
+longDescription = \
+    """This plugin implements project support for Kivy projects."""
 needsRestart = False
 pyqtApi = 2
 # End-of-Header
@@ -40,6 +41,7 @@
     """
     Module function to return the API files made available by this plugin.
     
+    @param language language to get API file for (string)
     @return list of API filenames (list of string)
     """
     if language in ["Python2"]:
@@ -95,22 +97,23 @@
         @return tuple of None and activation status (boolean)
         """
         try:
-            self.__e5project.registerProjectType("Kivy", self.trUtf8("Kivy"),
-                self.fileTypesCallback,
+            self.__e5project.registerProjectType(
+                "Kivy", self.trUtf8("Kivy"), self.fileTypesCallback,
                 lexerAssociationCallback=self.lexerAssociationCallback,
                 progLanguages=["Python2"])
         except TypeError:
             # for backward compatibility
-            self.__e5project.registerProjectType("Kivy", self.trUtf8("Kivy"),
-                self.fileTypesCallback,
+            self.__e5project.registerProjectType(
+                "Kivy", self.trUtf8("Kivy"), self.fileTypesCallback,
                 lexerAssociationCallback=self.lexerAssociationCallback)
         
-        from Project.ProjectBrowser import SourcesBrowserFlag, FormsBrowserFlag, \
-            TranslationsBrowserFlag, OthersBrowserFlag
-        Preferences.setProjectBrowserFlagsDefault("Kivy",
-            SourcesBrowserFlag | \
-            FormsBrowserFlag | \
-            TranslationsBrowserFlag | \
+        from Project.ProjectBrowser import SourcesBrowserFlag, \
+            FormsBrowserFlag, TranslationsBrowserFlag, OthersBrowserFlag
+        Preferences.setProjectBrowserFlagsDefault(
+            "Kivy",
+            SourcesBrowserFlag |
+            FormsBrowserFlag |
+            TranslationsBrowserFlag |
             OthersBrowserFlag,
         )
         
@@ -118,21 +121,21 @@
         import QScintilla.Lexers
         if self.__ui.versionIsNewer('5.3.5', '20130611'):
             QScintilla.Lexers.registerLexer(
-                "Kivy", 
-                self.trUtf8("Kivy"), 
-                "dummy.kv", 
-                self.getLexer, 
+                "Kivy",
+                self.trUtf8("Kivy"),
+                "dummy.kv",
+                self.getLexer,
                 [self.trUtf8('Kivy Files (*.kv *.kivy)')],
-                [self.trUtf8('Kivy Files (*.kv)')], 
+                [self.trUtf8('Kivy Files (*.kv)')],
                 ['*.kv', '*.kivy']
             )
         else:
             # work around a bug in older versions
             QScintilla.Lexers.registerLexer(
-                "Kivy", 
-                self.trUtf8("Kivy"), 
-                "dummy.kv", 
-                self.getLexer, 
+                "Kivy",
+                self.trUtf8("Kivy"),
+                "dummy.kv",
+                self.getLexer,
                 self.trUtf8('Kivy Files (*.kv *.kivy)'),
                 self.trUtf8('Kivy Files (*.kv)'),
                 ['*.kv', '*.kivy']
@@ -160,8 +163,8 @@
         if self.__ui is not None:
             loc = self.__ui.getLocale()
             if loc and loc != "C":
-                locale_dir = \
-                    os.path.join(os.path.dirname(__file__), "ProjectKivy", "i18n")
+                locale_dir = os.path.join(
+                    os.path.dirname(__file__), "ProjectKivy", "i18n")
                 translation = "django_%s" % loc
                 translator = QTranslator(None)
                 loaded = translator.load(translation, locale_dir)
@@ -169,8 +172,8 @@
                     self.__translator = translator
                     e5App().installTranslator(self.__translator)
                 else:
-                    print("Warning: translation file '{0}' could not be loaded.".format(
-                        translation))
+                    print("Warning: translation file '{0}' could not be"
+                          " loaded.".format(translation))
                     print("Using default.")
     
     def fileTypesCallback(self):
@@ -195,7 +198,8 @@
         a file.
         
         @param filename name of the file (string)
-        @return name of the lexer (string) (Pygments lexers are prefixed with 'Pygments|')
+        @return name of the lexer (string) (Pygments lexers are prefixed with
+            'Pygments|')
         """
         for pattern, language in self.lexerAssociations.items():
             if fnmatch.fnmatch(filename, pattern):
Binary file PluginProjectKivy.zip has changed
--- a/ProjectKivy/Documentation/source/Plugin_Project_Kivy.PluginProjectKivy.html	Sat Sep 28 13:32:24 2013 +0200
+++ b/ProjectKivy/Documentation/source/Plugin_Project_Kivy.PluginProjectKivy.html	Thu Oct 24 19:25:06 2013 +0200
@@ -163,7 +163,8 @@
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-name of the lexer (string) (Pygments lexers are prefixed with 'Pygments|')
+name of the lexer (string) (Pygments lexers are prefixed with
+            'Pygments|')
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
@@ -174,6 +175,11 @@
 <p>
     Module function to return the API files made available by this plugin.
 </p><dl>
+<dt><i>language</i></dt>
+<dd>
+language to get API file for (string)
+</dd>
+</dl><dl>
 <dt>Returns:</dt>
 <dd>
 list of API filenames (list of string)
--- a/ProjectKivy/KivyLexer.py	Sat Sep 28 13:32:24 2013 +0200
+++ b/ProjectKivy/KivyLexer.py	Thu Oct 24 19:25:06 2013 +0200
@@ -18,6 +18,7 @@
 
 __all__ = ['KivyLexer']
 
+
 class KivyLexer(RegexLexer):
     """
     Class implementing a Pygments lexer for the Kivy language.
@@ -40,7 +41,7 @@
                 bygroups(Name.Class, Text, Punctuation, Text)),
             (r'(.*?)(\s*)(:)(\s*)(.*?)$',
                 bygroups(Name.Attribute, Text, Punctuation, Text,
-                using(PythonLexer)))],
+                         using(PythonLexer)))],
         'classList': [
             (r'(,)(\s*)([A-Z][A-Za-z0-9]*)',
                 bygroups(Punctuation, Text, Name.Class)),

eric ide

mercurial