From 2ee7f4b644a12a65c4be5ab6b5b5b9f2e9d64eeb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 26 Jun 2026 11:42:10 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docker/unsloth_pip_shim.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/unsloth_pip_shim.py b/docker/unsloth_pip_shim.py index efdd9a5bf3..080d071ba5 100644 --- a/docker/unsloth_pip_shim.py +++ b/docker/unsloth_pip_shim.py @@ -88,7 +88,10 @@ def _canon(token): # protected package pinned through a URL slips past _KEEP and reinstalls into # the base venv. A non-protected direct reference still returns its name and # is kept by the caller exactly as before (treated as an install target). - _dref = re.match(r"^([A-Za-z0-9][A-Za-z0-9._-]*)\s*(?:\[[^\]]*\])?\s*@(?:\s|git\+|hg\+|bzr\+|svn\+|[a-z]+://)", token) + _dref = re.match( + r"^([A-Za-z0-9][A-Za-z0-9._-]*)\s*(?:\[[^\]]*\])?\s*@(?:\s|git\+|hg\+|bzr\+|svn\+|[a-z]+://)", + token, + ) if _dref: return _dref.group(1).lower().replace("_", "-") or None if re.match(r"^[a-z]+\+", token) or "://" in token or token.startswith((".", "/")):