def __isAchieveValid(self, block, name): return ( block, name) in self.__acceptableAchieves or makeAchievesStorageName( block ) in self.__acceptableAchieves and name in self.__dossier.getBlock( block)
def _buildComLayoutSet(dossierType, comLayout): global _EXCLUDED_ACHIEVES result = set() for layout in comLayout: if hasattr(layout, 'recordsLayout'): result.update(set(((layout.name, r) for r in layout.recordsLayout))) result.add(achievements.makeAchievesStorageName(layout.name)) for dt in (_COMMON_DOSSIERS_TYPE, dossierType): result -= set(_EXCLUDED_ACHIEVES[dt]) result |= set(_CUSTOM_ACHIEVES[dt]) return result
def _buildComLayoutSet(dossierType, comLayout): global _EXCLUDED_ACHIEVES result = set() for layout in comLayout: if hasattr(layout, 'recordsLayout'): result.update(set(((layout.name, r) for r in layout.recordsLayout))) else: result.add(achievements.makeAchievesStorageName(layout.name)) for dt in (_COMMON_DOSSIERS_TYPE, dossierType): result -= set(_EXCLUDED_ACHIEVES[dt]) result |= set(_CUSTOM_ACHIEVES[dt]) return result
def __getPredefinedValue(self, getter): value = getter(self.getRecordName()) if value is None: value = getter(achievements.makeAchievesStorageName(self._block)) return value
def __isAchieveValid(self, block, name): return (block, name) in self.__acceptableAchieves or makeAchievesStorageName(block) in self.__acceptableAchieves and name in self.__dossier.getBlock(block)