Changeset 139

Show
Ignore:
Timestamp:
08/09/06 08:48:17 (2 years ago)
Author:
mk
Message:

Added scoring information for pylint index.

Files:

Legend:

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

    r135 r139  
    924924        self.value = 0 
    925925        if percent > 0.75: 
     926            self.add_info("%.2f%% formatted docstrings found, which is > 75%% and is worth 30p." % (percent*100)) 
    926927            self.value = 30 
    927928        elif percent > 0.50: 
     929            self.add_info("%.2f%% formatted docstrings found, which is > 50%% and is worth 20p." % (percent*100)) 
    928930            self.value = 20 
    929931        elif percent > 0.25: 
     932            self.add_info("%.2f%% formatted docstrings found, which is > 25%% and is worth 10p." % (percent*100)) 
    930933            self.value = 10 
     934        else: 
     935            self.add_info("%.2f%% formatted docstrings found, which is < 25%%, no points given." % (percent*100)) 
    931936 
    932937        self.details = "found %d/%d=%.2f%% objects with formatted docstrings" %\ 
     
    10971102            pylint_score = 0 
    10981103        self.value = int(ceil(pylint_score/10.0 * self.max_value)) 
     1104 
     1105        self.add_info("Score is %.2f/10, which is %d%% of maximum %d points = %d." % 
     1106                      (pylint_score, int(pylint_score*10), self.max_value, self.value)) 
    10991107 
    11001108        return self.value