Changeset 43

Show
Ignore:
Timestamp:
06/08/06 07:21:17 (7 years ago)
Author:
mk
Message:

Removed useless MegaIndex? class.

Files:

Legend:

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

    r41 r43  
    315315        self._indices_dict[index.name] = index 
    316316 
    317     def print_info(self): 
    318         """Print index name padded with dots, followed by value and details. 
    319         """ 
     317    def _print_info_one(self): 
    320318        print "%s%s (%s)" % (pad_with_dots(self.name), 
    321319                             pad_left_spaces(self.value), 
    322320                             self.details) 
    323321 
    324     def __getitem__(self, name): 
    325         return self._indices_dict[name] 
    326  
    327 class MegaIndex(Index): 
    328     """Index with special information schema, suitable for composite indices. 
    329     """ 
    330     def print_info(self): 
     322    def _print_info_many(self): 
    331323        max_value = self.max_value 
    332324        if max_value == 0: 
     
    343335        print msg 
    344336        print 
     337 
     338    def print_info(self): 
     339        """Print index name padded with dots, followed by value and details. 
     340        """ 
     341        if self.subindices: 
     342            self._print_info_many() 
     343        else: 
     344            self._print_info_one() 
     345 
     346    def __getitem__(self, name): 
     347        return self._indices_dict[name] 
    345348 
    346349################################################################################ 
     
    444447        return self.value 
    445448 
    446 class IndexInstallability(MegaIndex): 
     449class IndexInstallability(Index): 
    447450    name = "INSTALLABILITY" 
    448451 
     
    607610        return self.value 
    608611 
    609 class IndexDocumentation(MegaIndex): 
     612class IndexDocumentation(Index): 
    610613    name = "DOCUMENTATION" 
    611614 
     
    717720        return self.value 
    718721 
    719 class IndexCodeKwalitee(MegaIndex): 
     722class IndexCodeKwalitee(Index): 
    720723    name = "CODE KWALITEE" 
    721724