def push_projects(git_projects, dry_run=False):
    if not git_projects:
        ui.info(ui.green, "Nothing to push")
        return
    ui.info(ui.green, "Pushing", len(git_projects), "projects")
    for i, git_project in enumerate(git_projects):
        default_branch = git_project.default_branch.name
        remote_branch = git_project.default_branch.remote_branch
        ui.info_count(i, len(git_projects), git_project.src)
        git = qisrc.git.Git(git_project.path)
        if git_project.review:
            push_remote = git_project.review_remote
        else:
            push_remote = git_project.default_remote
        remote_ref = "%s/%s" % (push_remote.name, remote_branch)
        to_push = (default_branch, remote_branch) % "%s:%s"
        push_args = [push_remote.name, to_push]
        push_args.append("--force")
        if dry_run:
            push_args.append("--dry-run")
        rc, out = git.push(*push_args, raises=False)
        if rc == 0:
            ui.info(out)
        else:
            ui.error(out)
dataset/ETHPy150Open aldebaran/qibuild/python/qisrc/rebase.py/push_projects/swapped operands of `%`