Changeset 43
- Timestamp:
- 06/08/06 07:21:17 (7 years ago)
- Files:
-
- branches/mk/cheesecake/cheesecake_index.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/mk/cheesecake/cheesecake_index.py
r41 r43 315 315 self._indices_dict[index.name] = index 316 316 317 def print_info(self): 318 """Print index name padded with dots, followed by value and details. 319 """ 317 def _print_info_one(self): 320 318 print "%s%s (%s)" % (pad_with_dots(self.name), 321 319 pad_left_spaces(self.value), 322 320 self.details) 323 321 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): 331 323 max_value = self.max_value 332 324 if max_value == 0: … … 343 335 print msg 344 336 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] 345 348 346 349 ################################################################################ … … 444 447 return self.value 445 448 446 class IndexInstallability( MegaIndex):449 class IndexInstallability(Index): 447 450 name = "INSTALLABILITY" 448 451 … … 607 610 return self.value 608 611 609 class IndexDocumentation( MegaIndex):612 class IndexDocumentation(Index): 610 613 name = "DOCUMENTATION" 611 614 … … 717 720 return self.value 718 721 719 class IndexCodeKwalitee( MegaIndex):722 class IndexCodeKwalitee(Index): 720 723 name = "CODE KWALITEE" 721 724
