formatting, pass tests

This commit is contained in:
Matt Dering 2022-12-02 09:47:25 -05:00
parent 3a8b270dc0
commit 3ded202c2a
3 changed files with 7 additions and 2 deletions

View file

@ -126,7 +126,11 @@ class Classifier:
return Classifier(filenames)
def _get_skips(environ: MutableMapping[str, str], args: argparse.Namespace, hooks: list[Hook]) -> set[str]:
def _get_skips(
environ: MutableMapping[str, str],
args: argparse.Namespace,
hooks: list[Hook],
) -> set[str]:
skips = environ.get('SKIP', '')
environ_skips = {skip.strip() for skip in skips.split(',') if skip.strip()}
context_skips = {h.id for h in hooks if args.all_files and not h.run_all}

View file

@ -594,7 +594,7 @@ def test_compute_cols(hooks, expected):
),
)
def test_get_skips(environ, expected_output):
ret = _get_skips(environ)
ret = _get_skips(environ, args=mock.MagicMock(), hooks=mock.MagicMock())
assert ret == expected_output

View file

@ -1019,6 +1019,7 @@ def test_manifest_hooks(tempdir_factory, store):
types_or=[],
verbose=False,
fail_fast=False,
run_all=True,
)