From 952ae2c1613097b920c217dc34d4569169037929 Mon Sep 17 00:00:00 2001 From: Hannes Krumbiegel Date: Wed, 6 Sep 2023 09:25:00 +0200 Subject: [PATCH] Fix formatting --- spacy/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spacy/__init__.py b/spacy/__init__.py index 86addcab1..b2ead17aa 100644 --- a/spacy/__init__.py +++ b/spacy/__init__.py @@ -13,14 +13,18 @@ from thinc.api import Config, prefer_gpu, require_cpu, require_gpu # noqa: F401 from . import pipeline # noqa: F401 from . import util from .about import __version__ # noqa: F401 -try: + +try: # Emscripten does not make use of the CLI and can not use the CLI libraries # (typer etc.) that are imported here. Additionally importing requests, # which is also done here, requires a workaround on this platform. from .cli.info import info # noqa: F401 except ImportError: + 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