Some little optimization in the doc style checker.

Sun, 29 Sep 2013 18:41:53 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 29 Sep 2013 18:41:53 +0200
changeset 2967
f9acd647f881
parent 2966
f85f686981ad
child 2968
b109ff4678bc

Some little optimization in the doc style checker.

Plugins/CheckerPlugins/Pep8/Pep257Checker.py file | annotate | diff | comparison | revisions
UtilitiesPython2/Pep257CheckerPy2.py file | annotate | diff | comparison | revisions
--- a/Plugins/CheckerPlugins/Pep8/Pep257Checker.py	Sun Sep 29 18:23:27 2013 +0200
+++ b/Plugins/CheckerPlugins/Pep8/Pep257Checker.py	Sun Sep 29 18:41:53 2013 +0200
@@ -433,6 +433,10 @@
             # don't do anything, if essential data is missing
             return
         
+        if not self.__checkers:
+            # don't do anything, if no codes were selected
+            return
+        
         for keyword in self.__keywords:
             if keyword in self.__checkers:
                 for check in self.__checkers[keyword]:
--- a/UtilitiesPython2/Pep257CheckerPy2.py	Sun Sep 29 18:23:27 2013 +0200
+++ b/UtilitiesPython2/Pep257CheckerPy2.py	Sun Sep 29 18:41:53 2013 +0200
@@ -301,6 +301,10 @@
             # don't do anything, if essential data is missing
             return
         
+        if not self.__checkers:
+            # don't do anything, if no codes were selected
+            return
+        
         for keyword in self.__keywords:
             if keyword in self.__checkers:
                 for check in self.__checkers[keyword]:

eric ide

mercurial