Skip to content

Commit

Permalink
fix: remedy broken fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethEnevoldsen committed Dec 9, 2023
1 parent 4b57421 commit cbe03c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_token.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import augmenty
import spacy # type: ignore
from augmenty.token.insert import create_token_insert_random_augmenter_v1
from spacy.tokens import Doc # type: ignore

import augmenty
from augmenty.token.insert import create_token_insert_random_augmenter_v1

from .books import BOOKS
from .fixtures import nlp_da, nlp_en, nlp_en_md

Expand Down Expand Up @@ -180,7 +181,7 @@ def test_create_token_insert_augmenter(nlp_en): # noqa F811
words = ["cat"]
spaces = [False]
doc = Doc(nlp_en.vocab, words=words, spaces=spaces, pos=["NOUN"])
insert_fun = lambda: {"ORTH": "word"} # noqa: E731
insert_fun = lambda t: {"ORTH": "word"} # noqa
aug = augmenty.load("token_insert_v1", level=1, insert=insert_fun) # type: ignore
docs = list(augmenty.docs([doc], augmenter=aug, nlp=nlp_en))
assert len(docs[0]) == 2 # type: ignore
Expand Down

0 comments on commit cbe03c8

Please sign in to comment.