From 801b661b4fa15290253b902daca25a6f4cbc9080 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Sat, 6 Sep 2025 17:20:42 -0700 Subject: [PATCH] Resolve type errors --- Library/Homebrew/cli/args.rb | 2 +- Library/Homebrew/commands.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cli/args.rb b/Library/Homebrew/cli/args.rb index f57044dc3a..c6e0eb9b47 100644 --- a/Library/Homebrew/cli/args.rb +++ b/Library/Homebrew/cli/args.rb @@ -170,7 +170,7 @@ module Homebrew sig { returns(T::Array[String]) } def cli_args @cli_args ||= @processed_options.filter_map do |short, long| - option = long || short + option = T.must(long || short) switch = :"#{option_to_name(option)}?" flag = option_to_name(option).to_sym if @table[switch] == true || @table[flag] == true diff --git a/Library/Homebrew/commands.rb b/Library/Homebrew/commands.rb index 421866524d..6beee3bab9 100644 --- a/Library/Homebrew/commands.rb +++ b/Library/Homebrew/commands.rb @@ -204,7 +204,7 @@ module Commands cmd_parser.processed_options.filter_map do |short, long, desc, hidden| next if hidden - [long || short, desc] + [T.must(long || short), desc] end else options = []