Auto-format code with black (#9130)

Co-authored-by: explosion-bot <explosion-bot@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2021-09-03 10:47:03 +02:00 committed by GitHub
parent ca93504660
commit 584fae5807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 4 deletions

View File

@ -60,9 +60,14 @@ def project_assets(project_dir: Path, *, sparse_checkout: bool = False) -> None:
else:
dest.unlink()
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:
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(
asset["git"]["repo"],
asset["git"]["path"],

View File

@ -73,7 +73,14 @@ def project_run(
if subcommand in workflows:
msg.info(f"Running workflow '{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:
cmd = commands[subcommand]
for dep in cmd.get("deps", []):

View File

@ -553,7 +553,7 @@ def test_get_third_party_dependencies_runs():
("/tmp", "/tmp/subdir", True),
("/tmp", "/tmpdir", False),
("/tmp", "/tmp/subdir/..", True),
("/tmp", "/tmp/..", False)
("/tmp", "/tmp/..", False),
],
)
def test_is_subpath_of(parent, child, expected):