Show
Ignore:
Timestamp:
05/31/06 08:50:14 (6 years ago)
Author:
mk
Message:

Don't count empty docstrings (closes ticket #9).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/mk/cheesecake/codeparser.py

    r11 r32  
    2121        self.functions = [] 
    2222        self.docstrings = {} 
    23          
     23 
    2424        (path, filename) = os.path.split(pyfile) 
    2525        (module, ext) = os.path.splitext(filename) 
     
    3535            fullname = obj.fullName() 
    3636            if isinstance(obj, Module): 
    37                 self.modules.append(obj.fullName()
     37                self.modules.append(fullname
    3838            if isinstance(obj, Class): 
    39                 self.classes.append(obj.fullName()
     39                self.classes.append(fullname
    4040            if isinstance(obj, Function): 
    4141                self.method_func.append(fullname) 
    42             if obj.docstring
     42            if isinstance(obj.docstring, str) and obj.docstring.strip()
    4343                self.docstrings[fullname] = 1 
    4444