From 56d4d87aebdaf3383c9ae8f482f47edd423de1cd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 6 Aug 2021 13:38:06 +0200 Subject: [PATCH] Auto-format code with black (#8895) Co-authored-by: explosion-bot --- spacy/cli/project/pull.py | 4 +++- spacy/cli/project/push.py | 4 +++- spacy/tests/pipeline/test_spancat.py | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/spacy/cli/project/pull.py b/spacy/cli/project/pull.py index f121ef0a0..6e3cde88c 100644 --- a/spacy/cli/project/pull.py +++ b/spacy/cli/project/pull.py @@ -45,7 +45,9 @@ def project_pull(project_dir: Path, remote: str, *, verbose: bool = False): cmd_hash = get_command_hash("", "", deps, cmd["script"]) for output_path in cmd.get("outputs", []): url = storage.pull(output_path, command_hash=cmd_hash) - logger.debug(f"URL: {url} for {output_path} with command hash {cmd_hash}") + logger.debug( + f"URL: {url} for {output_path} with command hash {cmd_hash}" + ) yield url, output_path out_locs = [project_dir / out for out in cmd.get("outputs", [])] diff --git a/spacy/cli/project/push.py b/spacy/cli/project/push.py index 98a01d6dd..bc779e9cd 100644 --- a/spacy/cli/project/push.py +++ b/spacy/cli/project/push.py @@ -54,7 +54,9 @@ def project_push(project_dir: Path, remote: str): command_hash=cmd_hash, content_hash=get_content_hash(output_loc), ) - logger.debug(f"URL: {url} for output {output_path} with cmd_hash {cmd_hash}") + logger.debug( + f"URL: {url} for output {output_path} with cmd_hash {cmd_hash}" + ) yield output_path, url diff --git a/spacy/tests/pipeline/test_spancat.py b/spacy/tests/pipeline/test_spancat.py index a0ef7e3f0..6a5ae2c66 100644 --- a/spacy/tests/pipeline/test_spancat.py +++ b/spacy/tests/pipeline/test_spancat.py @@ -123,7 +123,10 @@ def test_ngram_suggester(en_tokenizer): assert spans.shape[0] == len(spans_set) offset += ngrams.lengths[i] # the number of spans is correct - assert_array_equal(OPS.to_numpy(ngrams.lengths), [max(0, len(doc) - (size - 1)) for doc in docs]) + assert_array_equal( + OPS.to_numpy(ngrams.lengths), + [max(0, len(doc) - (size - 1)) for doc in docs], + ) # test 1-3-gram suggestions ngram_suggester = registry.misc.get("spacy.ngram_suggester.v1")(sizes=[1, 2, 3])