diff --git a/src/pip/_internal/locations/__init__.py b/src/pip/_internal/locations/__init__.py index 7d5491d20ad..418b9607d20 100644 --- a/src/pip/_internal/locations/__init__.py +++ b/src/pip/_internal/locations/__init__.py @@ -65,7 +65,9 @@ def _looks_like_bpo_44860() -> bool: def _looks_like_red_hat_patched_platlib_purelib(scheme: Dict[str, str]) -> bool: platlib = scheme["platlib"] if "/$platlibdir/" in platlib and hasattr(sys, "platlibdir"): - platlib = platlib.replace("/$platlibdir/", f"/{sys.platlibdir}/") + platlib = platlib.replace( + "/$platlibdir/", f"/{sys.platlibdir}/" # type: ignore + ) if "/lib64/" not in platlib: return False unpatched = platlib.replace("/lib64/", "/lib/")