mirror of https://github.com/explosion/spaCy.git
Auto-format code with black (#9130)
Co-authored-by: explosion-bot <explosion-bot@users.noreply.github.com>
This commit is contained in:
parent
ca93504660
commit
584fae5807
|
@ -60,9 +60,14 @@ def project_assets(project_dir: Path, *, sparse_checkout: bool = False) -> None:
|
||||||
else:
|
else:
|
||||||
dest.unlink()
|
dest.unlink()
|
||||||
if "repo" not in asset["git"] or asset["git"]["repo"] is None:
|
if "repo" not in asset["git"] or asset["git"]["repo"] is None:
|
||||||
msg.fail("A git asset must include 'repo', the repository address.", exits=1)
|
msg.fail(
|
||||||
|
"A git asset must include 'repo', the repository address.", exits=1
|
||||||
|
)
|
||||||
if "path" not in asset["git"] or asset["git"]["path"] is None:
|
if "path" not in asset["git"] or asset["git"]["path"] is None:
|
||||||
msg.fail("A git asset must include 'path' - use \"\" to get the entire repository.", exits=1)
|
msg.fail(
|
||||||
|
"A git asset must include 'path' - use \"\" to get the entire repository.",
|
||||||
|
exits=1,
|
||||||
|
)
|
||||||
git_checkout(
|
git_checkout(
|
||||||
asset["git"]["repo"],
|
asset["git"]["repo"],
|
||||||
asset["git"]["path"],
|
asset["git"]["path"],
|
||||||
|
|
|
@ -73,7 +73,14 @@ def project_run(
|
||||||
if subcommand in workflows:
|
if subcommand in workflows:
|
||||||
msg.info(f"Running workflow '{subcommand}'")
|
msg.info(f"Running workflow '{subcommand}'")
|
||||||
for cmd in workflows[subcommand]:
|
for cmd in workflows[subcommand]:
|
||||||
project_run(project_dir, cmd, overrides=overrides, force=force, dry=dry, capture=capture)
|
project_run(
|
||||||
|
project_dir,
|
||||||
|
cmd,
|
||||||
|
overrides=overrides,
|
||||||
|
force=force,
|
||||||
|
dry=dry,
|
||||||
|
capture=capture,
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
cmd = commands[subcommand]
|
cmd = commands[subcommand]
|
||||||
for dep in cmd.get("deps", []):
|
for dep in cmd.get("deps", []):
|
||||||
|
|
|
@ -553,7 +553,7 @@ def test_get_third_party_dependencies_runs():
|
||||||
("/tmp", "/tmp/subdir", True),
|
("/tmp", "/tmp/subdir", True),
|
||||||
("/tmp", "/tmpdir", False),
|
("/tmp", "/tmpdir", False),
|
||||||
("/tmp", "/tmp/subdir/..", True),
|
("/tmp", "/tmp/subdir/..", True),
|
||||||
("/tmp", "/tmp/..", False)
|
("/tmp", "/tmp/..", False),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_is_subpath_of(parent, child, expected):
|
def test_is_subpath_of(parent, child, expected):
|
||||||
|
|
Loading…
Reference in New Issue