From b324655afb03a422a6d334eab620fcef928eddef Mon Sep 17 00:00:00 2001 From: Raphael Mitsch Date: Mon, 13 Mar 2023 10:57:00 +0100 Subject: [PATCH] Fix or ignore mypy issues in test. --- spacy/tests/pipeline/test_entity_linker.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spacy/tests/pipeline/test_entity_linker.py b/spacy/tests/pipeline/test_entity_linker.py index 4558be70a..fc960cb01 100644 --- a/spacy/tests/pipeline/test_entity_linker.py +++ b/spacy/tests/pipeline/test_entity_linker.py @@ -150,15 +150,14 @@ def test_sentence_crossing_ents(entity_in_first_sentence: bool): # Create the Entity Linker component and add it to the pipeline entity_linker = nlp.add_pipe("entity_linker", last=True) - entity_linker.set_kb(create_kb) + entity_linker.set_kb(create_kb) # type: ignore # train the NEL pipe optimizer = nlp.initialize(get_examples=lambda: train_examples) for i in range(2): - losses = {} - nlp.update(train_examples, sgd=optimizer, losses=losses) + nlp.update(train_examples, sgd=optimizer) # This shouldn't crash. - entity_linker.predict([example.reference]) + entity_linker.predict([example.reference]) # type: ignore def test_no_entities():