summaryrefslogtreecommitdiffstats
path: root/pre_commit/envcontext.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-11 08:29:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-11 08:29:48 +0000
commitb73378b6cdae53383ce4549f0f301ece440b2969 (patch)
tree94678c0984baae45fd0358db8309e9190b3fe362 /pre_commit/envcontext.py
parentReleasing debian version 3.5.0-1. (diff)
downloadpre-commit-b73378b6cdae53383ce4549f0f301ece440b2969.tar.xz
pre-commit-b73378b6cdae53383ce4549f0f301ece440b2969.zip
Merging upstream version 3.6.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/envcontext.py')
-rw-r--r--pre_commit/envcontext.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/pre_commit/envcontext.py b/pre_commit/envcontext.py
index 4f59560..1f816ce 100644
--- a/pre_commit/envcontext.py
+++ b/pre_commit/envcontext.py
@@ -3,10 +3,9 @@ from __future__ import annotations
import contextlib
import enum
import os
-from typing import Generator
-from typing import MutableMapping
+from collections.abc import Generator
+from collections.abc import MutableMapping
from typing import NamedTuple
-from typing import Tuple
from typing import Union
_Unset = enum.Enum('_Unset', 'UNSET')
@@ -18,9 +17,9 @@ class Var(NamedTuple):
default: str = ''
-SubstitutionT = Tuple[Union[str, Var], ...]
+SubstitutionT = tuple[Union[str, Var], ...]
ValueT = Union[str, _Unset, SubstitutionT]
-PatchesT = Tuple[Tuple[str, ValueT], ...]
+PatchesT = tuple[tuple[str, ValueT], ...]
def format_env(parts: SubstitutionT, env: MutableMapping[str, str]) -> str: