diff --git a/Library/Homebrew/sbom.rb b/Library/Homebrew/sbom.rb index d92e022d70785b..abdc98b865e8ba 100644 --- a/Library/Homebrew/sbom.rb +++ b/Library/Homebrew/sbom.rb @@ -145,7 +145,7 @@ def generate_relations_json(runtime_dependency_declaration, compiler_declaration runtime + patches + base end - sig { params(runtime_dependency_declaration: T::Array[Hash], compiler_declaration: Hash).returns(T::Array[Hash]) } + sig { params(runtime_dependency_declaration: T::Array[Hash], compiler_declaration: Hash).returns(T::Array[T::Hash[Symbol, T.any(String, T::Array[T::Hash[Symbol, String]])]]) } def generate_packages_json(runtime_dependency_declaration, compiler_declaration) bottle = [] if get_bottle_info(source["bottle"]) @@ -197,7 +197,7 @@ def generate_packages_json(runtime_dependency_declaration, compiler_declaration) ] + runtime_dependency_declaration + compiler_declaration.values + bottle end - sig { returns(Hash) } + sig { returns(T::Hash[Symbol, T.any(String, T::Array[T::Hash[Symbol, String]])]]) } def to_spdx_sbom runtime_full = [] @@ -278,7 +278,7 @@ def to_spdx_sbom } end - sig { params(formula: Formula, deps: T::Array[Dependency]).returns(T::Array[Hash]) } + sig { params(formula: Formula, deps: T::Array[Dependency]).returns(T::Array[T::Hash[Symbol, String]]) } def self.runtime_deps_hash(formula, deps) deps.map do |dep| f = dep.to_formula @@ -297,7 +297,7 @@ def self.runtime_deps_hash(formula, deps) private - sig { params(base: T::Hash[String, Hash]).returns(T.nilable(Hash)) } + sig { params(base: T::Hash[String, Hash]).returns(T.nilable(T::Hash[String,String])) } def get_bottle_info(base) return unless base.key?("files")