Tidy up and auto-format

This commit is contained in:
Ines Montani 2020-09-04 13:42:33 +02:00
parent df0b68f60e
commit 90043a6f9b
4 changed files with 4 additions and 13 deletions

View File

@ -1376,8 +1376,6 @@ class Language:
docs = (self.make_doc(text) for text in texts)
for pipe in pipes:
docs = pipe(docs)
nr_seen = 0
for doc in docs:
yield doc

View File

@ -56,15 +56,7 @@ def test_lex_attrs_like_number(en_tokenizer, text, match):
assert tokens[0].like_num == match
@pytest.mark.parametrize(
"word",
[
"third",
"Millionth",
"100th",
"Hundredth",
]
)
@pytest.mark.parametrize("word", ["third", "Millionth", "100th", "Hundredth"])
def test_en_lex_attrs_like_number_for_ordinal(word):
assert like_num(word)

View File

@ -71,6 +71,6 @@ def test_overfitting_IO():
def test_tagger_requires_labels():
nlp = English()
tagger = nlp.add_pipe("tagger")
nlp.add_pipe("tagger")
with pytest.raises(ValueError):
optimizer = nlp.begin_training()
nlp.begin_training()

View File

@ -135,6 +135,7 @@ TRAIN_DATA = [
("Eat blue ham", {"tags": ["V", "J", "N"]}),
]
def test_tok2vec_listener():
orig_config = Config().from_str(cfg_string)
nlp, config = util.load_model_from_config(orig_config, auto_fill=True, validate=True)