We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5666663 + b2f27f4 commit 9b89272Copy full SHA for 9b89272
2 files changed
pre_commit_hooks/shellcheck_run_steps.py
@@ -5,35 +5,15 @@
5
import os
6
import subprocess
7
import tempfile
8
-from collections.abc import Generator
9
from collections.abc import Mapping
10
from collections.abc import Sequence
11
from typing import Any
12
-from typing import NamedTuple
13
14
import ruamel.yaml
15
16
yaml = ruamel.yaml.YAML(typ="safe")
17
18
19
-def _exhaust(gen: Generator[str]) -> None:
20
- for _ in gen:
21
- pass
22
-
23
24
-def _parse_unsafe(*args: Any, **kwargs: Any) -> None:
25
- _exhaust(yaml.parse(*args, **kwargs))
26
27
28
-def _load_all(*args: Any, **kwargs: Any) -> None:
29
- _exhaust(yaml.load_all(*args, **kwargs))
30
31
32
-class Key(NamedTuple):
33
- multi: bool
34
- unsafe: bool
35
36
37
def do_shellcheck(
38
melange_cfg: Mapping[str, Any],
39
shellcheck: list[str],
ruff.toml
0 commit comments