mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 02:06:31 +03:00
Format
This commit is contained in:
parent
dc22771f87
commit
8fb59d958c
|
@ -350,7 +350,10 @@ def git_sparse_checkout(repo, subpath, dest, branch):
|
||||||
# We're using Git and sparse checkout to only clone the files we need
|
# We're using Git and sparse checkout to only clone the files we need
|
||||||
with make_tempdir() as tmp_dir:
|
with make_tempdir() as tmp_dir:
|
||||||
# This is the "clone, but don't download anything" part.
|
# This is the "clone, but don't download anything" part.
|
||||||
cmd = f"git clone {repo} {tmp_dir} --no-checkout --depth 1 " f"-b {branch} --filter=blob:none"
|
cmd = (
|
||||||
|
f"git clone {repo} {tmp_dir} --no-checkout --depth 1 "
|
||||||
|
f"-b {branch} --filter=blob:none"
|
||||||
|
)
|
||||||
run_command(cmd)
|
run_command(cmd)
|
||||||
# Now we need to find the missing filenames for the subpath we want.
|
# Now we need to find the missing filenames for the subpath we want.
|
||||||
# Looking for this 'rev-list' command in the git --help? Hah.
|
# Looking for this 'rev-list' command in the git --help? Hah.
|
||||||
|
|
|
@ -254,7 +254,7 @@ def load_vectors_into_model(
|
||||||
|
|
||||||
|
|
||||||
def load_vocab_data_into_model(
|
def load_vocab_data_into_model(
|
||||||
nlp: "Language", *, lookups: Optional["Lookups"]=None
|
nlp: "Language", *, lookups: Optional["Lookups"] = None
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Load vocab data."""
|
"""Load vocab data."""
|
||||||
if lookups:
|
if lookups:
|
||||||
|
@ -660,7 +660,7 @@ def run_command(
|
||||||
command: Union[str, List[str]],
|
command: Union[str, List[str]],
|
||||||
*,
|
*,
|
||||||
stdin: Optional[Any] = None,
|
stdin: Optional[Any] = None,
|
||||||
capture: bool=False,
|
capture: bool = False,
|
||||||
) -> Optional[subprocess.CompletedProcess]:
|
) -> Optional[subprocess.CompletedProcess]:
|
||||||
"""Run a command on the command line as a subprocess. If the subprocess
|
"""Run a command on the command line as a subprocess. If the subprocess
|
||||||
returns a non-zero exit code, a system exit is performed.
|
returns a non-zero exit code, a system exit is performed.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user