def move_article(dir, args, repo, extension):
    "move an article from source to destination"
    args = args.split()
    if len(args) != 2:
        print("Invalid usage\nUse: mv source dest")
        return False

    a = os.path.join(dir, args[0])
    a = add_fileextension(a, extension)
    e = os.path.join(dir, args[1])
    e = add_fileextension(e, extension)
    d = os.path.dirname(e)

    # create dir(s)
    if not os.path.isdir(d):
        os.makedirs(d)

    # move file in git and commit
    try:
        repo.git.mv(a, e)
        repo.git.commit(m=(a, e) % "Moved %s to %s")
        print("Moved %s to %s" % (a, e))
    except git.exc.GitCommandError:
        print("Error: File could not be moved")
dataset/ETHPy150Open noqqe/cmddocs/cmddocs/articles.py/move_article/swapped operands of `%`