Skip to content

Commit aec59c0

Browse files
authored
Merge pull request #13040 from adrianeboyd/revert/12962-spacy-info
Revert "Load the cli module lazily for spacy.info (#12962)"
2 parents 92ce32a + 6d0185f commit aec59c0

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

spacy/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from . import pipeline # noqa: F401
1414
from . import util
1515
from .about import __version__ # noqa: F401
16+
from .cli.info import info # noqa: F401
1617
from .errors import Errors
1718
from .glossary import explain # noqa: F401
1819
from .language import Language
@@ -76,9 +77,3 @@ def blank(
7677
# We should accept both dot notation and nested dict here for consistency
7778
config = util.dot_to_dict(config)
7879
return LangClass.from_config(config, vocab=vocab, meta=meta)
79-
80-
81-
def info(*args, **kwargs):
82-
from .cli.info import info as cli_info
83-
84-
return cli_info(*args, **kwargs)

spacy/tests/test_cli.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
import spacy
1414
from spacy import about
15-
from spacy import info as spacy_info
1615
from spacy.cli import info
1716
from spacy.cli._util import parse_config_overrides, string_to_list, walk_directory
1817
from spacy.cli.apply import apply
@@ -193,9 +192,6 @@ def test_cli_info():
193192
raw_data = info(tmp_dir, exclude=[""])
194193
assert raw_data["lang"] == "nl"
195194
assert raw_data["components"] == ["textcat"]
196-
raw_data = spacy_info(tmp_dir, exclude=[""])
197-
assert raw_data["lang"] == "nl"
198-
assert raw_data["components"] == ["textcat"]
199195

200196

201197
def test_cli_converters_conllu_to_docs():

0 commit comments

Comments
 (0)