From 0f0ae2e7a1e98b338bdd3cbf86485d57fb3106fa Mon Sep 17 00:00:00 2001 From: Noah Gorny Date: Wed, 29 Sep 2021 00:41:02 +0300 Subject: [PATCH] locations: Add ignore directive to mypy for sys.platlibdir --- src/pip/_internal/locations/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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/")