From 015d439eb6d79d8d9c3dca9f07901714e9d47958 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 08:49:19 +0200 Subject: [PATCH] Auto-format code with black (#9234) Co-authored-by: explosion-bot --- spacy/tests/doc/test_token_api.py | 2 ++ spacy/training/loggers.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/spacy/tests/doc/test_token_api.py b/spacy/tests/doc/test_token_api.py index 38178cd00..e715c5e85 100644 --- a/spacy/tests/doc/test_token_api.py +++ b/spacy/tests/doc/test_token_api.py @@ -202,11 +202,13 @@ def test_set_pos(): doc[1].pos = VERB assert doc[1].pos_ == "VERB" + def test_set_invalid_pos(): doc = Doc(Vocab(), words=["hello", "world"]) with pytest.raises(ValueError): doc[0].pos_ = "blah" + def test_tokens_sent(doc): """Test token.sent property""" assert len(list(doc.sents)) == 3 diff --git a/spacy/training/loggers.py b/spacy/training/loggers.py index 524b422a5..137e89e56 100644 --- a/spacy/training/loggers.py +++ b/spacy/training/loggers.py @@ -206,7 +206,9 @@ def wandb_logger( for field in remove_config_values: del config_dot[field] config = util.dot_to_dict(config_dot) - run = wandb.init(project=project_name, config=config, entity=entity, reinit=True) + run = wandb.init( + project=project_name, config=config, entity=entity, reinit=True + ) if run_name: wandb.run.name = run_name