def __init__(self, pool, literals, reason, reason_details="", job=None,
                 id=-1, version_factory=SemanticVersion.from_string, **kw):
        if reason == "job_install":
            if not is_valid_package_name(reason_details):
                raise DepSolverError(
                        "reason_details must be a valid package name for "
                        "'job_install' rule")
        elif reason == "package_requires":
            try:
                Requirement.from_string(reason_details, version_factory=version_factory)
            except Exception:
                raise DepSolverError((reason_details,) % "Invalid requirement string '%s'")

        literals = sorted(literals)
        super(PackageRule, self).__init__(pool=pool, literals=literals,
                reason=reason, reason_details=reason_details, job=job, id=id,
                **kw)
dataset/ETHPy150Open enthought/depsolver/depsolver/solver/rule.py/PackageRule.__init__/swapped operands of `%`