diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-11 08:29:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-11 08:29:45 +0000 |
commit | bfb804ed317bbbd1e0089c80c1b1d3510185bca6 (patch) | |
tree | 93ee86b21565e569256a09e651a10c08befcd4b8 /pre_commit/languages/rust.py | |
parent | Adding upstream version 3.5.0. (diff) | |
download | pre-commit-bfb804ed317bbbd1e0089c80c1b1d3510185bca6.tar.xz pre-commit-bfb804ed317bbbd1e0089c80c1b1d3510185bca6.zip |
Adding upstream version 3.6.0.upstream/3.6.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/languages/rust.py')
-rw-r--r-- | pre_commit/languages/rust.py | 6 |
1 files changed, 3 insertions, 3 deletions
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)) |