Skip to content

Commit cf510fc

Browse files
committed
Fix linting and static typing errors
1 parent 9214066 commit cf510fc

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

src/pombast/cache/_repo.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
from pathlib import Path
77
from typing import TYPE_CHECKING
88

9-
from pombast.util._git import bare_clone, default_branch, fetch_tags, has_ref, remote_url
9+
from pombast.util._git import (
10+
bare_clone,
11+
default_branch,
12+
fetch_tags,
13+
has_ref,
14+
remote_url,
15+
)
1016

1117
if TYPE_CHECKING:
1218
from pombast.core._component import Component

src/pombast/core/_pipeline.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,16 @@ def run(self) -> ValidationReport:
251251
)
252252
shutil.rmtree(source_dir)
253253
try:
254+
if component.scm_url is None:
255+
_log.error("%s: no scm url — %s", component.coordinate)
256+
report.results.append(
257+
BuildResult(
258+
component=component,
259+
status=BuildStatus.ERROR,
260+
skipped_reason="no scm url",
261+
)
262+
)
263+
continue
254264
bare_repo = repo_cache.ensure_ref(component, component.scm_url, tag)
255265
shallow_clone(bare_repo, tag, source_dir)
256266
except Exception as e:

0 commit comments

Comments
 (0)