api/analytics: use typed: strict

Signed-off-by: Patrick Linnane <patrick@linnane.io>
This commit is contained in:
Patrick Linnane 2024-08-19 10:16:26 -07:00
parent 2a5eb025f1
commit 85dfe2561b
No known key found for this signature in database

View File

@ -1,4 +1,4 @@
# typed: true # rubocop:todo Sorbet/StrictSigil # typed: strict
# frozen_string_literal: true # frozen_string_literal: true
module Homebrew module Homebrew
@ -12,7 +12,7 @@ module Homebrew
end end
alias generic_analytics_api_path analytics_api_path alias generic_analytics_api_path analytics_api_path
sig { params(category: String, days: T.any(Integer, String)).returns(Hash) } sig { params(category: String, days: T.any(Integer, String)).returns(T::Hash[String, Integer]) }
def fetch(category, days) def fetch(category, days)
Homebrew::API.fetch "#{analytics_api_path}/#{category}/#{days}d.json" Homebrew::API.fetch "#{analytics_api_path}/#{category}/#{days}d.json"
end end