diff --git a/spacy/strings.pyx b/spacy/strings.pyx index c5dd4725b..df8755308 100644 --- a/spacy/strings.pyx +++ b/spacy/strings.pyx @@ -1,8 +1,9 @@ # cython: infer_types=True # cython: profile=False cimport cython -from typing import Iterable, Iterator, List, Optional, Tuple, Union + from contextlib import contextmanager +from typing import Iterable, Iterator, List, Optional, Tuple, Union from libc.stdint cimport uint32_t from libc.string cimport memcpy diff --git a/spacy/vocab.pyi b/spacy/vocab.pyi index ae8708fec..ee7636f02 100644 --- a/spacy/vocab.pyi +++ b/spacy/vocab.pyi @@ -1,9 +1,9 @@ +from contextlib import contextmanager from pathlib import Path from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Union -from contextlib import contextmanager -from thinc.types import Floats1d, FloatsXd from cymem.cymem import Pool +from thinc.types import Floats1d, FloatsXd from . import Language from .lexeme import Lexeme diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index ebadcbf9b..97ba5d68c 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -1,10 +1,10 @@ import functools +from contextlib import ExitStack, contextmanager +from typing import Iterator, Optional import numpy import srsly from thinc.api import get_array_module, get_current_ops -from contextlib import contextmanager, ExitStack -from typing import Iterator, Optional from .attrs cimport LANG, ORTH from .lexeme cimport EMPTY_LEXEME, OOV_RANK, Lexeme