From bfb804ed317bbbd1e0089c80c1b1d3510185bca6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 11 Dec 2023 09:29:45 +0100 Subject: Adding upstream version 3.6.0. Signed-off-by: Daniel Baumann --- pre_commit/languages/rust.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pre_commit/languages/rust.py') diff --git a/pre_commit/languages/rust.py b/pre_commit/languages/rust.py index 7eec0e7..7b04d6c 100644 --- a/pre_commit/languages/rust.py +++ b/pre_commit/languages/rust.py @@ -7,8 +7,8 @@ import shutil import sys import tempfile import urllib.request -from typing import Generator -from typing import Sequence +from collections.abc import Generator +from collections.abc import Sequence import pre_commit.constants as C from pre_commit import lang_base @@ -134,7 +134,7 @@ def install_environment( packages_to_install: set[tuple[str, ...]] = {('--path', '.')} for cli_dep in cli_deps: - cli_dep = cli_dep[len('cli:'):] + cli_dep = cli_dep.removeprefix('cli:') package, _, crate_version = cli_dep.partition(':') if crate_version != '': packages_to_install.add((package, '--version', crate_version)) -- cgit v1.2.3