mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-10 16:22:29 +03:00
specify registry_name options
This commit is contained in:
parent
5f077aa145
commit
1f0da50c8e
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from catalogue import RegistryError
|
from catalogue import RegistryError
|
||||||
from wasabi import msg
|
from wasabi import msg
|
||||||
|
|
||||||
|
@ -9,7 +11,7 @@ from ._util import Arg, Opt, app
|
||||||
def find_function_cli(
|
def find_function_cli(
|
||||||
# fmt: off
|
# fmt: off
|
||||||
func_name: str = Arg(..., help="Name of the registered function."),
|
func_name: str = Arg(..., help="Name of the registered function."),
|
||||||
registry_name: str = Opt(None, help="Name of the catalogue registry."),
|
registry_name: Optional[str] = Opt(None, "--registry", "-r", help="Name of the catalogue registry."),
|
||||||
# fmt: on
|
# fmt: on
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
|
@ -17,7 +19,9 @@ def find_function_cli(
|
||||||
function is defined in, if available.
|
function is defined in, if available.
|
||||||
|
|
||||||
func_name (str): Name of the registered function.
|
func_name (str): Name of the registered function.
|
||||||
registry_name (str): Name of the catalogue registry.
|
registry_name (Optional[str]): Name of the catalogue registry.
|
||||||
|
|
||||||
|
DOCS: https://spacy.io/api/cli#find-function
|
||||||
"""
|
"""
|
||||||
if not registry_name:
|
if not registry_name:
|
||||||
registry_names = registry.get_registry_names()
|
registry_names = registry.get_registry_names()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user