From 23fd432f3f9420ec663449748495a01b5194f2e7 Mon Sep 17 00:00:00 2001 From: Hannes Krumbiegel Date: Mon, 4 Sep 2023 17:39:30 +0200 Subject: [PATCH] Update spacy/__init__.py Co-authored-by: Hood Chatham --- spacy/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/__init__.py b/spacy/__init__.py index 68e9985f1..86addcab1 100644 --- a/spacy/__init__.py +++ b/spacy/__init__.py @@ -19,7 +19,8 @@ try: # which is also done here, requires a workaround on this platform. from .cli.info import info # noqa: F401 except ImportError: - info = lambda *args: "Importing the CLI failed. Info function not available." + def info(*args, **kwargs): + raise RuntimeError("Importing the CLI failed. Info function not available.") from .errors import Errors from .glossary import explain # noqa: F401 from .language import Language