From 07f9f3f8e06f34c0f37d63097965c9c835abb121 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Wed, 17 Jul 2024 16:19:12 -0400 Subject: [PATCH] utils/github/artifacts: Bump to Sorbet `typed: strict` --- Library/Homebrew/utils/github/artifacts.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/utils/github/artifacts.rb b/Library/Homebrew/utils/github/artifacts.rb index 9e0756a5f1..607ee521f9 100644 --- a/Library/Homebrew/utils/github/artifacts.rb +++ b/Library/Homebrew/utils/github/artifacts.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require "download_strategy" @@ -24,12 +24,14 @@ end # Strategy for downloading an artifact from GitHub Actions. class GitHubArtifactDownloadStrategy < AbstractFileDownloadStrategy + sig { params(url: String, artifact_id: String, token: String).void } def initialize(url, artifact_id, token:) super(url, "artifact", artifact_id) - @cache = HOMEBREW_CACHE/"gh-actions-artifact" - @token = token + @cache = T.let(HOMEBREW_CACHE/"gh-actions-artifact", Pathname) + @token = T.let(token, String) end + sig { params(timeout: T.nilable(Integer)).void } def fetch(timeout: nil) ohai "Downloading #{url}" if cached_location.exist?