Revert "Make some of the bundle commands Sorbet typed: true"

This commit is contained in:
Mike McQuaid 2025-06-23 13:52:35 +01:00 committed by GitHub
parent cfede01ea9
commit 68dbf12220
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 16 deletions

View File

@ -1,4 +1,4 @@
# typed: true
# typed: false # rubocop:todo Sorbet/TrueSigil
# frozen_string_literal: true
require "json"
@ -189,12 +189,7 @@ module Homebrew
class Topo < Hash
include TSort
def each_key(&block)
keys.each(&block)
end
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node.downcase).sort.each(&block)
end
@ -235,8 +230,8 @@ module Homebrew
odie <<~EOS
Formulae dependency graph sorting failed (likely due to a circular dependency):
#{cycle_first}: #{topo[cycle_first] if topo}
#{cycle_last}: #{topo[cycle_last] if topo}
#{cycle_first}: #{topo[cycle_first]}
#{cycle_last}: #{topo[cycle_last]}
Please run the following commands and try again:
brew update
brew uninstall --ignore-dependencies --force #{cycle_first} #{cycle_last}

View File

@ -1,4 +1,4 @@
# typed: true
# typed: false # rubocop:todo Sorbet/TrueSigil
# frozen_string_literal: true
module Homebrew
@ -23,7 +23,7 @@ module Homebrew
else
"needs to be installed or updated."
end
"#{self.class.const_get(:PACKAGE_TYPE_NAME)} #{name} #{reason}"
"#{self.class::PACKAGE_TYPE_NAME} #{name} #{reason}"
end
def full_check(packages, no_upgrade:)
@ -33,7 +33,7 @@ module Homebrew
def checkable_entries(all_entries)
require "bundle/skipper"
all_entries.select { |e| e.type == self.class.const_get(:PACKAGE_TYPE) }
all_entries.select { |e| e.type == self.class::PACKAGE_TYPE }
.reject(&Bundle::Skipper.method(:skip?))
end

View File

@ -1,5 +0,0 @@
# typed: true
module Homebrew::Bundle::BrewDumper
include Kernel
end