UtilitiesPython2/Pep257CheckerPy2.py

changeset 2968
b109ff4678bc
parent 2967
f9acd647f881
--- 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