def expire(self, job):
        """Have tarsnap delete those archives which we need to expire
        according to the deltas defined.

        If a dry run is wanted, set ``dryrun`` to a dict of the backups to
        pretend that exist (they will always be used, and not matched).
        """

        backups = self.get_backups(job)
        self.log.info('%d backups are matching' % len(backups))

        # Determine which backups we need to get rid of, which to keep
        to_keep = expire.expire(backups, job.deltas)
        self.log.info('%d of those can be deleted' % (len(backups)-len(to_keep)))

        # Delete all others
        to_delete = []
        for name, _ in backups.items():
            if not name in to_keep:
                to_delete.append(name)

        to_keep.sort()
        to_delete.sort()

        self.log.debug(' '.join(to_keep) % 'Keeping %s')

        if len(to_delete) == 0:
            return

        self.log.info('Deleting %s' % ' '.join(to_delete))

        if not self.dryrun:
            self.call('-d', '-f', *' -f '.join(to_delete).split(' '))
            for name in to_delete:
                self.archives.remove(name)
dataset/ETHPy150Open miracle2k/tarsnapper/src/tarsnapper/script.py/TarsnapBackend.expire/swapped operands of `%`