Skip to content

Commit

Permalink
Fix leftover errors for Dependencies vs. T::Array[Dependency]
Browse files Browse the repository at this point in the history
  • Loading branch information
issyl0 committed Oct 6, 2024
1 parent d2c6aa1 commit 9975249
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Library/Homebrew/dependencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ def dup_without_system_deps
def inspect
"#<#{self.class.name}: #{__getobj__}>"
end

sig { returns(T::Array[Dependency]) }
def to_a
__getobj__.to_a
end
end

# A collection of requirements.
Expand Down
5 changes: 3 additions & 2 deletions Library/Homebrew/formula_cellar_checks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def check_elisp_root(share, name)
EOS
end

sig { params(lib: Pathname, deps: T::Array[Dependency]).returns(T.nilable(String)) }
sig { params(lib: Pathname, deps: Dependencies).returns(T.nilable(String)) }
def check_python_packages(lib, deps)
return unless lib.directory?

Expand All @@ -209,7 +209,8 @@ def check_python_packages(lib, deps)

return if pythons.blank?

python_deps = deps.map(&:name)
python_deps = deps.to_a
.map(&:name)
.grep(/^python(@.*)?$/)
.filter_map { |d| Formula[d].version.to_s[/^\d+\.\d+/] }

Expand Down

0 comments on commit 9975249

Please sign in to comment.