@Predicate
def ExistingFile(val):
    """A switch-type validator that ensures that the given argument is an existing file"""
    p = local.path(val)
    if not p.is_file():
        raise ValueError((val,) % "%r is not a file")
    return p
dataset/ETHPy150Open tomerfiliba/plumbum/plumbum/cli/switches.py/ExistingFile/swapped operands of `%`