def _nextPurge(self, source: BackupSource, backups, findNext=False):
    '\n        Given a list of backups, decides if one should be purged.\n        '
    if ((not source.enabled()) or (len(backups) == 0)):
        return None
    if ((source.maxCount() == 0) and (not self.config.get(Setting.DELETE_AFTER_UPLOAD))):
        return None
    scheme = self._buildDeleteScheme(source, findNext=findNext)
    consider_purging = []
    for backup in backups:
        source_backup = backup.getSource(source.name())
        if ((source_backup is not None) and source_backup.considerForPurge() and (not backup.ignore())):
            consider_purging.append(backup)
    if (len(consider_purging) == 0):
        return None
    return scheme.getOldest(consider_purging)
Given a list of backups, decides if one should be purged.
def _nextPurge(self, source: BackupSource, backups, findNext=False):
    '\n        \n        '
    if ((not source.enabled()) or (len(backups) == 0)):
        return None
    if ((source.maxCount() == 0) and (not self.config.get(Setting.DELETE_AFTER_UPLOAD))):
        return None
    scheme = self._buildDeleteScheme(source, findNext=findNext)
    consider_purging = []
    for backup in backups:
        source_backup = backup.getSource(source.name())
        if ((source_backup is not None) and source_backup.considerForPurge() and (not backup.ignore())):
            consider_purging.append(backup)
    if (len(consider_purging) == 0):
        return None
    return scheme.getOldest(consider_purging)