Skip to content

Commit

Permalink
style: improve typing
Browse files Browse the repository at this point in the history
Signed-off-by: Callahan Kovacs <[email protected]>
  • Loading branch information
mr-cal committed Oct 6, 2023
1 parent 89446fb commit 84f1f3e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions snapcraft/remote/launchpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ def _fetch_artifacts(self, snap: Optional[Entry]) -> None:

def _get_builds_collection_entry(self, snap: Optional[Entry]) -> Optional[Entry]:
logger.debug("Fetching builds collection information from Launchpad...")
url = snap.builds_collection_link # type: ignore
return self._lp_load_url(cast(str, url))
if snap:
url = cast(str, snap.builds_collection_link)
return self._lp_load_url(url)
return None

def _get_builds(self, snap: Optional[Entry]) -> List[Dict[str, Any]]:
builds_collection = self._get_builds_collection_entry(snap)
Expand Down

0 comments on commit 84f1f3e

Please sign in to comment.