Resolve type errors
This commit is contained in:
parent
e1aae25fd2
commit
801b661b4f
@ -170,7 +170,7 @@ module Homebrew
|
|||||||
sig { returns(T::Array[String]) }
|
sig { returns(T::Array[String]) }
|
||||||
def cli_args
|
def cli_args
|
||||||
@cli_args ||= @processed_options.filter_map do |short, long|
|
@cli_args ||= @processed_options.filter_map do |short, long|
|
||||||
option = long || short
|
option = T.must(long || short)
|
||||||
switch = :"#{option_to_name(option)}?"
|
switch = :"#{option_to_name(option)}?"
|
||||||
flag = option_to_name(option).to_sym
|
flag = option_to_name(option).to_sym
|
||||||
if @table[switch] == true || @table[flag] == true
|
if @table[switch] == true || @table[flag] == true
|
||||||
|
|||||||
@ -204,7 +204,7 @@ module Commands
|
|||||||
cmd_parser.processed_options.filter_map do |short, long, desc, hidden|
|
cmd_parser.processed_options.filter_map do |short, long, desc, hidden|
|
||||||
next if hidden
|
next if hidden
|
||||||
|
|
||||||
[long || short, desc]
|
[T.must(long || short), desc]
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
options = []
|
options = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user