|
11 | 11 | from typing import Collection |
12 | 12 | from typing import Dict |
13 | 13 | from typing import List |
| 14 | +from typing import MutableMapping |
14 | 15 | from typing import Sequence |
15 | 16 | from typing import Set |
16 | 17 | from typing import Tuple |
|
28 | 29 | from pre_commit.staged_files_only import staged_files_only |
29 | 30 | from pre_commit.store import Store |
30 | 31 | from pre_commit.util import cmd_output_b |
31 | | -from pre_commit.util import EnvironT |
32 | 32 |
|
33 | 33 |
|
34 | 34 | logger = logging.getLogger('pre_commit') |
@@ -116,7 +116,7 @@ def from_config( |
116 | 116 | return Classifier(filenames) |
117 | 117 |
|
118 | 118 |
|
119 | | -def _get_skips(environ: EnvironT) -> Set[str]: |
| 119 | +def _get_skips(environ: MutableMapping[str, str]) -> Set[str]: |
120 | 120 | skips = environ.get('SKIP', '') |
121 | 121 | return {skip.strip() for skip in skips.split(',') if skip.strip()} |
122 | 122 |
|
@@ -258,7 +258,7 @@ def _run_hooks( |
258 | 258 | config: Dict[str, Any], |
259 | 259 | hooks: Sequence[Hook], |
260 | 260 | args: argparse.Namespace, |
261 | | - environ: EnvironT, |
| 261 | + environ: MutableMapping[str, str], |
262 | 262 | ) -> int: |
263 | 263 | """Actually run the hooks.""" |
264 | 264 | skips = _get_skips(environ) |
@@ -315,7 +315,7 @@ def run( |
315 | 315 | config_file: str, |
316 | 316 | store: Store, |
317 | 317 | args: argparse.Namespace, |
318 | | - environ: EnvironT = os.environ, |
| 318 | + environ: MutableMapping[str, str] = os.environ, |
319 | 319 | ) -> int: |
320 | 320 | stash = not args.all_files and not args.files |
321 | 321 |
|
|
0 commit comments