Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
SMillerDev authored May 3, 2024
1 parent 62b9d7d commit 6ad273d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Library/Homebrew/sbom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down Expand Up @@ -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 = []

Expand Down Expand Up @@ -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
Expand All @@ -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")

Expand Down

0 comments on commit 6ad273d

Please sign in to comment.