Resolve violations from removing hidden.rbi

This commit is contained in:
Douglas Eichelberger 2024-02-04 05:53:52 -08:00
parent c83e0170a9
commit 5b5cfe89de
6 changed files with 8 additions and 8 deletions

View File

@ -55,7 +55,7 @@ module Homebrew
github_output = ENV.fetch("GITHUB_OUTPUT")
File.open(github_output, "a") do |f|
f.puts("runners=#{runners.to_json}")
f.puts("runners=#{T.unsafe(runners).to_json}")
f.puts("runners_present=#{runners.present?}")
end
end

View File

@ -63,7 +63,7 @@ module SharedEnvExtension
sig { returns(T::Hash[String, String]) }
def remove_cc_etc
keys = %w[CC CXX OBJC OBJCXX LD CPP CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS LDFLAGS CPPFLAGS]
keys.to_h { |key| [key, delete(key)] }
keys.to_h { |key| [key, T.must(delete(key))] }
end
sig { params(newflags: String).void }

View File

@ -355,11 +355,11 @@ module FormulaCellarChecks
else
true
end
return if mismatches.empty? && universal_binaries_expected
return if T.must(mismatches).empty? && universal_binaries_expected
mismatches_expected = formula.tap.blank? ||
formula.tap.audit_exception(:mismatched_binary_allowlist, formula.name)
return if compatible_universal_binaries.empty? && mismatches_expected
return if T.must(compatible_universal_binaries).empty? && mismatches_expected
return if universal_binaries_expected && mismatches_expected

View File

@ -68,7 +68,7 @@ class Mktemp
begin
chown(nil, group_id, @tmpdir)
rescue Errno::EPERM
opoo "Failed setting group \"#{T.must(Etc.getgrgid(group_id)).name}\" on #{@tmpdir}"
opoo "Failed setting group \"#{T.unsafe(Etc.getgrgid(group_id)).name}\" on #{@tmpdir}"
end
begin

View File

@ -118,8 +118,8 @@ class MacOSRequirement < Requirement
def to_json(options)
comp = @comparator.to_s
return { comp => @version.map(&:to_s) }.to_json(options) if @version.is_a?(Array)
return T.unsafe({ comp => @version.map(&:to_s) }).to_json(options) if @version.is_a?(Array)
{ comp => [@version.to_s] }.to_json(options)
T.unsafe({ comp => [@version.to_s] }).to_json(options)
end
end

View File

@ -192,7 +192,7 @@ class SoftwareSpec
def uses_from_macos(deps, bounds = {})
if deps.is_a?(Hash)
bounds = deps.dup
deps = [bounds.shift].to_h
deps = [T.unsafe(bounds).shift].to_h
end
spec, tags = deps.is_a?(Hash) ? deps.first : deps