mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-07 05:40:20 +03:00
Format with black
This commit is contained in:
parent
4eb61a71c8
commit
10513a0a4e
|
@ -339,7 +339,7 @@ def _project_run_parallel_cmd(
|
|||
) -> None:
|
||||
"""Run a single spaCy projects command as a worker process.
|
||||
|
||||
Communicates with the main process via queue messages whose type is determined
|
||||
Communicates with the main process via queue messages whose type is determined
|
||||
by the entry 'mess_type' and that are structured as dictionaries. Possible
|
||||
values of 'mess_type' are 'started', 'completed' and 'keepalive'. Each dictionary
|
||||
type contains different additional fields."""
|
||||
|
@ -356,7 +356,7 @@ def _project_run_parallel_cmd(
|
|||
if len(command) and command[0] in ("python", "python3"):
|
||||
# -u: prevent buffering within Python
|
||||
command = [sys.executable, "-u", *command[1:]]
|
||||
elif len(command) and command[0].startswith("python3"): # e.g. python3.10
|
||||
elif len(command) and command[0].startswith("python3"): # e.g. python3.10
|
||||
command = [command[0], "-u", *command[1:]]
|
||||
elif len(command) and command[0] in ("pip", "pip3"):
|
||||
command = [sys.executable, "-m", "pip", *command[1:]]
|
||||
|
|
|
@ -160,7 +160,11 @@ def print_run_help(project_dir: Path, subcommand: Optional[str] = None) -> None:
|
|||
print(f"\nWorkflow consisting of {len(steps)} commands:")
|
||||
if contains_parallel:
|
||||
parallel_steps_data = [
|
||||
(f"{i + 1}.", f"{step[0]} {step[1]}", commands[step[1]].get("help", ""))
|
||||
(
|
||||
f"{i + 1}.",
|
||||
f"{step[0]} {step[1]}",
|
||||
commands[step[1]].get("help", ""),
|
||||
)
|
||||
for i, step in enumerate(steps)
|
||||
]
|
||||
msg.table(parallel_steps_data)
|
||||
|
|
Loading…
Reference in New Issue
Block a user