def scale_up(self, new_rc, old_rc, original, desired, max_surge, max_unavailable):
        # if we're already at the desired, do nothing.
        if new_rc.replicas == desired:
            return new_rc
        # scale up as far as we can based on the surge limit.
        increment = (old_rc.replicas + new_rc.replicas) - (original + max_surge)
        # if the old is already scaled down, go ahead and scale all the way up.
        if old_rc.replicas == 0:
            increment = desired - new_rc.replicas
        # we can't scale up without violating the surge limit, so do nothing
        if increment <= 0:
            return new_rc
        # increase the replica count, and deal with fenceposts
        new_rc.replicas = min(desired, new_rc.replicas + increment)
        # perform the scale up
        logger.info("scaling {} up to {}".format(new_rc.name, new_rc.replicas))
        new_rc.scale()
        return new_rc
dataset/ETHPy150Open eldarion-gondor/pykube/pykube/rolling_updater.py/RollingUpdater.scale_up/swapped operands of `-`