Removed the check for a module being a script because scripts should be well documented as well.

Sun, 29 Sep 2013 19:12:52 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 29 Sep 2013 19:12:52 +0200
changeset 2968
b109ff4678bc
parent 2967
f9acd647f881
child 2969
0e1af1313b8b

Removed the check for a module being a script because scripts should be well documented as well.

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:41:53 2013 +0200
+++ b/Plugins/CheckerPlugins/Pep8/Pep257Checker.py	Sun Sep 29 19:12:52 2013 +0200
@@ -253,7 +253,6 @@
         self.__docType = docType
         self.__filename = filename
         self.__source = source[:]
-        self.__isScript = self.__source[0].startswith('#!')
         
         # statistics counters
         self.counters = {}
@@ -763,10 +762,6 @@
         @param docstringContext docstring context (Pep257Context)
         @param context context of the docstring (Pep257Context)
         """
-        if self.__isScript:
-            # assume nothing is exported
-            return
-        
         functionName = context.source()[0].lstrip().split()[1].split("(")[0]
         if functionName.startswith('_') and not functionName.endswith('__'):
             if self.__docType == "eric":
@@ -793,10 +788,6 @@
         @param docstringContext docstring context (Pep257Context)
         @param context context of the docstring (Pep257Context)
         """
-        if self.__isScript:
-            # assume nothing is exported
-            return
-        
         className = context.source()[0].lstrip().split()[1].split("(")[0]
         if className.startswith('_'):
             if self.__docType == "eric":
@@ -967,7 +958,7 @@
         @param docstringContext docstring context (Pep257Context)
         @param context context of the docstring (Pep257Context)
         """
-        if docstringContext is None or self.__isScript:
+        if docstringContext is None:
             return
         
         if "return" not in docstringContext.ssource().lower():
@@ -1130,7 +1121,7 @@
         @param docstringContext docstring context (Pep257Context)
         @param context context of the docstring (Pep257Context)
         """
-        if docstringContext is None or self.__isScript:
+        if docstringContext is None:
             return
         
         tokens = list(
@@ -1156,7 +1147,7 @@
         @param docstringContext docstring context (Pep257Context)
         @param context context of the docstring (Pep257Context)
         """
-        if docstringContext is None or self.__isScript:
+        if docstringContext is None:
             return
         
         try:
@@ -1206,7 +1197,7 @@
         @param docstringContext docstring context (Pep257Context)
         @param context context of the docstring (Pep257Context)
         """
-        if docstringContext is None or self.__isScript:
+        if docstringContext is None:
             return
         
         tokens = list(
--- a/UtilitiesPython2/Pep257CheckerPy2.py	Sun Sep 29 18:41:53 2013 +0200
+++ b/UtilitiesPython2/Pep257CheckerPy2.py	Sun Sep 29 19:12:52 2013 +0200
@@ -142,7 +142,6 @@
         self.__docType = docType
         self.__filename = filename
         self.__source = source[:]
-        self.__isScript = self.__source[0].startswith('#!')
         
         # statistics counters
         self.counters = {}
@@ -631,10 +630,6 @@
         @param docstringContext docstring context (Pep257Context)
         @param context context of the docstring (Pep257Context)
         """
-        if self.__isScript:
-            # assume nothing is exported
-            return
-        
         functionName = context.source()[0].lstrip().split()[1].split("(")[0]
         if functionName.startswith('_') and not functionName.endswith('__'):
             if self.__docType == "eric":
@@ -661,10 +656,6 @@
         @param docstringContext docstring context (Pep257Context)
         @param context context of the docstring (Pep257Context)
         """
-        if self.__isScript:
-            # assume nothing is exported
-            return
-        
         className = context.source()[0].lstrip().split()[1].split("(")[0]
         if className.startswith('_'):
             if self.__docType == "eric":
@@ -835,7 +826,7 @@
         @param docstringContext docstring context (Pep257Context)
         @param context context of the docstring (Pep257Context)
         """
-        if docstringContext is None or self.__isScript:
+        if docstringContext is None:
             return
         
         if "return" not in docstringContext.ssource().lower():
@@ -998,7 +989,7 @@
         @param docstringContext docstring context (Pep257Context)
         @param context context of the docstring (Pep257Context)
         """
-        if docstringContext is None or self.__isScript:
+        if docstringContext is None:
             return
         
         tokens = list(
@@ -1024,7 +1015,7 @@
         @param docstringContext docstring context (Pep257Context)
         @param context context of the docstring (Pep257Context)
         """
-        if docstringContext is None or self.__isScript:
+        if docstringContext is None:
             return
         
         try:
@@ -1074,7 +1065,7 @@
         @param docstringContext docstring context (Pep257Context)
         @param context context of the docstring (Pep257Context)
         """
-        if docstringContext is None or self.__isScript:
+        if docstringContext is None:
             return
         
         tokens = list(

eric ide

mercurial