From 7654cf87e99ece6eb3725e3d90ed089dca55a19d Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Sat, 12 Sep 2020 00:41:56 +0000 Subject: [PATCH] sorbet: update RBI files using Tapioca. Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml). --- ....7.1.rbi => rubocop-performance@1.8.0.rbi} | 247 ++++++++++++------ .../{tapioca@0.4.4.rbi => tapioca@0.4.5.rbi} | 4 +- .../sorbet/rbi/hidden-definitions/hidden.rbi | 2 + 3 files changed, 175 insertions(+), 78 deletions(-) rename Library/Homebrew/sorbet/rbi/gems/{rubocop-performance@1.7.1.rbi => rubocop-performance@1.8.0.rbi} (75%) rename Library/Homebrew/sorbet/rbi/gems/{tapioca@0.4.4.rbi => tapioca@0.4.5.rbi} (99%) diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.7.1.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.8.0.rbi similarity index 75% rename from Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.7.1.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.8.0.rbi index 4a236060aad76..c082a77a0b73d 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.7.1.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.8.0.rbi @@ -1,6 +1,6 @@ # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `rubocop-performance` gem. -# Please instead update this file by running `tapioca generate --exclude json`. +# Please instead update this file by running `tapioca sync`. # typed: true @@ -13,18 +13,23 @@ end module RuboCop::Cop::Performance end -class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) + extend(::RuboCop::Cop::AutoCorrector) def ancestors_include_candidate?(node = T.unsafe(nil)); end - def autocorrect(node); end def on_send(node); end + + private + + def range(node); end end RuboCop::Cop::Performance::AncestorsInclude::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def big_decimal_with_numeric_argument?(node = T.unsafe(nil)); end def on_send(node); end @@ -35,11 +40,11 @@ end RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::BindCall < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::BindCall < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) + extend(::RuboCop::Cop::AutoCorrector) extend(::RuboCop::Cop::TargetRubyVersion) - def autocorrect(node); end def bind_with_call_method?(node = T.unsafe(nil)); end def on_send(node); end @@ -52,7 +57,7 @@ end RuboCop::Cop::Performance::BindCall::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::Caller < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::Caller < ::RuboCop::Cop::Base def caller_with_scope_method?(node = T.unsafe(nil)); end def on_send(node); end def slow_caller?(node = T.unsafe(nil)); end @@ -67,21 +72,23 @@ RuboCop::Cop::Performance::Caller::MSG_BRACE = T.let(T.unsafe(nil), String) RuboCop::Cop::Performance::Caller::MSG_FIRST = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::CaseWhenSplat < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::CaseWhenSplat < ::RuboCop::Cop::Base include(::RuboCop::Cop::Alignment) include(::RuboCop::Cop::RangeHelp) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(when_node); end def on_case(case_node); end private + def autocorrect(corrector, when_node); end def indent_for(node); end def inline_fix_branch(corrector, when_node); end def needs_reorder?(when_node); end def new_branch_without_then(node, new_condition); end def new_condition_with_then(node, new_condition); end def non_splat?(condition); end + def range(node); end def reorder_condition(corrector, when_node); end def reordering_correction(when_node); end def replacement(conditions); end @@ -93,8 +100,9 @@ RuboCop::Cop::Performance::CaseWhenSplat::ARRAY_MSG = T.let(T.unsafe(nil), Strin RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def downcase_downcase(node = T.unsafe(nil)); end def downcase_eq(node = T.unsafe(nil)); end def eq_downcase(node = T.unsafe(nil)); end @@ -103,7 +111,7 @@ class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Cop private def build_good_method(arg, variable); end - def correction(node, _receiver, method, arg, variable); end + def correction(corrector, node, method, arg, variable); end def take_method_apart(node); end end @@ -111,7 +119,7 @@ RuboCop::Cop::Performance::Casecmp::CASE_METHODS = T.let(T.unsafe(nil), Array) RuboCop::Cop::Performance::Casecmp::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) def flat_map_candidate?(node = T.unsafe(nil)); end @@ -128,10 +136,44 @@ RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY_WHEN_NO_BLOCK RuboCop::Cop::Performance::ChainArrayAllocation::RETURN_NEW_ARRAY_WHEN_ARGS = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::CompareWithBlock < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::CollectionLiteralInLoop < ::RuboCop::Cop::Base + def enumerable_loop?(node = T.unsafe(nil)); end + def kernel_loop?(node = T.unsafe(nil)); end + def on_send(node); end + + private + + def check_literal?(node, method); end + def enumerable_method?(method_name); end + def keyword_loop?(type); end + def literal_class(node); end + def loop?(ancestor, node); end + def min_size; end + def node_within_enumerable_loop?(node, ancestor); end + def nonmutable_method_of_array_or_hash?(node, method); end + def parent_is_loop?(node); end +end + +RuboCop::Cop::Performance::CollectionLiteralInLoop::ARRAY_METHODS = T.let(T.unsafe(nil), Set) + +RuboCop::Cop::Performance::CollectionLiteralInLoop::ENUMERABLE_METHOD_NAMES = T.let(T.unsafe(nil), Set) + +RuboCop::Cop::Performance::CollectionLiteralInLoop::HASH_METHODS = T.let(T.unsafe(nil), Set) + +RuboCop::Cop::Performance::CollectionLiteralInLoop::LOOP_TYPES = T.let(T.unsafe(nil), Array) + +RuboCop::Cop::Performance::CollectionLiteralInLoop::MSG = T.let(T.unsafe(nil), String) + +RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Array) + +RuboCop::Cop::Performance::CollectionLiteralInLoop::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) + +class RuboCop::Cop::Performance::CompareWithBlock < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(node); end def compare?(node = T.unsafe(nil)); end def on_block(node); end def replaceable_body?(node = T.unsafe(nil), param1, param2); end @@ -145,26 +187,27 @@ end RuboCop::Cop::Performance::CompareWithBlock::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(node); end def count_candidate?(node = T.unsafe(nil)); end def on_send(node); end private + def autocorrect(corrector, node, selector_node, selector); end def eligible_node?(node); end def source_starting_at(node); end end RuboCop::Cop::Performance::Count::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::DeletePrefix < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::DeletePrefix < ::RuboCop::Cop::Base include(::RuboCop::Cop::RegexpMetacharacter) + extend(::RuboCop::Cop::AutoCorrector) extend(::RuboCop::Cop::TargetRubyVersion) - def autocorrect(node); end def delete_prefix_candidate?(node = T.unsafe(nil)); end def on_send(node); end end @@ -173,11 +216,11 @@ RuboCop::Cop::Performance::DeletePrefix::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Performance::DeletePrefix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) -class RuboCop::Cop::Performance::DeleteSuffix < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::DeleteSuffix < ::RuboCop::Cop::Base include(::RuboCop::Cop::RegexpMetacharacter) + extend(::RuboCop::Cop::AutoCorrector) extend(::RuboCop::Cop::TargetRubyVersion) - def autocorrect(node); end def delete_suffix_candidate?(node = T.unsafe(nil)); end def on_send(node); end end @@ -186,14 +229,16 @@ RuboCop::Cop::Performance::DeleteSuffix::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Performance::DeleteSuffix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) -class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def detect_candidate?(node = T.unsafe(nil)); end def on_send(node); end private def accept_first_call?(receiver, body); end + def autocorrect(corrector, node); end def lazy?(node); end def preferred_method; end def register_offense(node, receiver, second_method); end @@ -203,26 +248,28 @@ RuboCop::Cop::Performance::Detect::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def check_with_active_support_aliases(node = T.unsafe(nil)); end def on_or(node); end def two_start_end_with_calls(node = T.unsafe(nil)); end private - def add_offense_for_double_call(node, receiver, method, combined_args); end + def autocorrect(corrector, first_call_args, second_call_args, combined_args); end def check_for_active_support_aliases?; end def combine_args(first_call_args, second_call_args); end + def message(node, receiver, method, combined_args); end def process_source(node); end end RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Base include(::RuboCop::Cop::RegexpMetacharacter) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(node); end def on_match_with_lvasgn(node); end def on_send(node); end def redundant_regex?(node = T.unsafe(nil)); end @@ -230,7 +277,7 @@ end RuboCop::Cop::Performance::EndWith::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Base def counter(node = T.unsafe(nil)); end def on_send(node); end @@ -246,15 +293,16 @@ end RuboCop::Cop::Performance::FixedSize::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(node); end def flat_map_candidate?(node = T.unsafe(nil)); end def on_send(node); end private + def autocorrect(corrector, node); end def offense_for_levels(node, map_node, first_method, flatten); end def offense_for_method(node, map_node, first_method, flatten); end def register_offense(node, map_node, first_method, flatten, message); end @@ -264,8 +312,9 @@ RuboCop::Cop::Performance::FlatMap::FLATTEN_MULTIPLE_LEVELS = T.let(T.unsafe(nil RuboCop::Cop::Performance::FlatMap::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def inefficient_include?(node = T.unsafe(nil)); end def on_send(node); end @@ -279,22 +328,22 @@ class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Cop def use_long_method; end end -class RuboCop::Cop::Performance::IoReadlines < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::IoReadlines < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(node); end def on_send(node); end def readlines_on_class?(node = T.unsafe(nil)); end def readlines_on_instance?(node = T.unsafe(nil)); end private + def autocorrect(corrector, enumerable_call, readlines_call, receiver); end def build_bad_method(enumerable_call); end def build_call_args(call_args_node); end def build_good_method(enumerable_call); end def correction_range(enumerable_call, readlines_call); end def enumerable_method?(node); end - def offense(node, enumerable_call, readlines_call); end def offense_range(enumerable_call, readlines_call); end end @@ -302,23 +351,25 @@ RuboCop::Cop::Performance::IoReadlines::ENUMERABLE_METHODS = T.let(T.unsafe(nil) RuboCop::Cop::Performance::IoReadlines::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::OpenStruct < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::OpenStruct < ::RuboCop::Cop::Base def on_send(node); end def open_struct(node = T.unsafe(nil)); end end RuboCop::Cop::Performance::OpenStruct::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def on_send(node); end def range_include(node = T.unsafe(nil)); end end RuboCop::Cop::Performance::RangeInclude::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def blockarg_assigned?(node0, param1); end def blockarg_calls(node0, param1); end def blockarg_def(node = T.unsafe(nil)); end @@ -327,6 +378,7 @@ class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Cop private def args_include_block_pass?(blockcall); end + def autocorrect(corrector, node); end def calls_to_report(argname, body); end end @@ -340,25 +392,31 @@ RuboCop::Cop::Performance::RedundantBlockCall::SPACE = T.let(T.unsafe(nil), Stri RuboCop::Cop::Performance::RedundantBlockCall::YIELD = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def match_call?(node = T.unsafe(nil)); end def on_send(node); end def only_truthiness_matters?(node = T.unsafe(nil)); end + + private + + def autocorrect(corrector, node); end end RuboCop::Cop::Performance::RedundantMatch::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::RedundantMerge < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::RedundantMerge < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def modifier_flow_control?(node = T.unsafe(nil)); end def on_send(node); end def redundant_merge_candidate(node = T.unsafe(nil)); end private - def correct_multiple_elements(node, parent, new_source); end - def correct_single_element(node, new_source); end + def correct_multiple_elements(corrector, node, parent, new_source); end + def correct_single_element(corrector, node, new_source); end def each_redundant_merge(node); end def indent_width; end def kwsplat_used?(pairs); end @@ -395,11 +453,11 @@ RuboCop::Cop::Performance::RedundantMerge::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Performance::RedundantMerge::WITH_MODIFIER_CORRECTION = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::RedundantSortBlock < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::RedundantSortBlock < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) include(::RuboCop::Cop::SortBlock) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(node); end def on_block(node); end private @@ -409,10 +467,10 @@ end RuboCop::Cop::Performance::RedundantSortBlock::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::RedundantStringChars < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::RedundantStringChars < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(node); end def on_send(node); end def redundant_chars_call?(node = T.unsafe(nil)); end @@ -431,8 +489,9 @@ RuboCop::Cop::Performance::RedundantStringChars::MSG = T.let(T.unsafe(nil), Stri RuboCop::Cop::Performance::RedundantStringChars::REPLACEABLE_METHODS = T.let(T.unsafe(nil), Array) -class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def last_matches(node0); end def match_method?(node = T.unsafe(nil)); end def match_node?(node = T.unsafe(nil)); end @@ -446,6 +505,7 @@ class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Cop private + def autocorrect(corrector, node); end def check_condition(cond); end def correct_operator(corrector, recv, arg, oper = T.unsafe(nil)); end def correction_range(recv, arg); end @@ -468,22 +528,26 @@ RuboCop::Cop::Performance::RegexpMatch::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Performance::RegexpMatch::TYPES_IMPLEMENTING_MATCH = T.let(T.unsafe(nil), Array) -class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(node); end def on_send(node); end def reverse_each?(node = T.unsafe(nil)); end + + private + + def replacement_range(node); end end RuboCop::Cop::Performance::ReverseEach::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Performance::ReverseEach::UNDERSCORE = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(node); end def on_send(node); end def reverse_first_candidate?(node = T.unsafe(nil)); end @@ -497,9 +561,10 @@ end RuboCop::Cop::Performance::ReverseFirst::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def array?(node = T.unsafe(nil)); end - def autocorrect(node); end def count?(node = T.unsafe(nil)); end def hash?(node = T.unsafe(nil)); end def on_send(node); end @@ -507,11 +572,11 @@ end RuboCop::Cop::Performance::Size::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::SortReverse < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::SortReverse < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) include(::RuboCop::Cop::SortBlock) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(node); end def on_block(node); end private @@ -521,8 +586,9 @@ end RuboCop::Cop::Performance::SortReverse::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def on_send(node); end def squeeze_candidate?(node = T.unsafe(nil)); end @@ -535,10 +601,10 @@ RuboCop::Cop::Performance::Squeeze::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Performance::Squeeze::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) -class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Base include(::RuboCop::Cop::RegexpMetacharacter) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(node); end def on_match_with_lvasgn(node); end def on_send(node); end def redundant_regex?(node = T.unsafe(nil)); end @@ -546,8 +612,9 @@ end RuboCop::Cop::Performance::StartWith::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def on_match_with_lvasgn(node); end def on_send(node); end def redundant_regex?(node = T.unsafe(nil)); end @@ -559,24 +626,25 @@ end RuboCop::Cop::Performance::StringInclude::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Base include(::RuboCop::Cop::RangeHelp) + extend(::RuboCop::Cop::AutoCorrector) - def autocorrect(node); end def on_send(node); end - def replace_method(node, first, second, first_param, replacement); end def string_replacement?(node = T.unsafe(nil)); end private def accept_first_param?(first_param); end def accept_second_param?(second_param); end + def autocorrect(corrector, node); end def first_source(first_param); end def message(node, first_source, second_source); end def method_suffix(node); end def offense(node, first_param, second_param); end def range(node); end def remove_second_param(corrector, node, first_param); end + def replace_method(corrector, node, first_source, second_source, first_param); end def replacement_method(node, first_source, second_source); end def source_from_regex_constructor(node); end def source_from_regex_literal(node); end @@ -592,8 +660,34 @@ RuboCop::Cop::Performance::StringReplacement::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base + include(::RuboCop::Cop::RangeHelp) + extend(::RuboCop::Cop::AutoCorrector) + + def acc_plus_elem?(node = T.unsafe(nil), param1, param2); end + def elem_plus_acc?(node = T.unsafe(nil), param1, param2); end + def on_block(node); end + def on_send(node); end + def sum_candidate?(node = T.unsafe(nil)); end + def sum_with_block_candidate?(node = T.unsafe(nil)); end + + private + + def autocorrect(corrector, init, range); end + def build_block_bad_method(method, init, var_acc, var_elem, body); end + def build_block_message(send, init, var_acc, var_elem, body); end + def build_good_method(init); end + def build_method_bad_method(init, method); end + def build_method_message(method, init); end + def sum_block_range(send, node); end + def sum_method_range(node); end +end + +RuboCop::Cop::Performance::Sum::MSG = T.let(T.unsafe(nil), String) + +class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def on_block(node); end def on_send(node); end def times_map_call(node = T.unsafe(nil)); end @@ -608,7 +702,7 @@ RuboCop::Cop::Performance::TimesMap::MESSAGE = T.let(T.unsafe(nil), String) RuboCop::Cop::Performance::TimesMap::MESSAGE_ONLY_IF = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Cop +class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Base def dup_string?(node = T.unsafe(nil)); end def on_send(node); end def string_new?(node = T.unsafe(nil)); end @@ -616,8 +710,9 @@ end RuboCop::Cop::Performance::UnfreezeString::MSG = T.let(T.unsafe(nil), String) -class RuboCop::Cop::Performance::UriDefaultParser < ::RuboCop::Cop::Cop - def autocorrect(node); end +class RuboCop::Cop::Performance::UriDefaultParser < ::RuboCop::Cop::Base + extend(::RuboCop::Cop::AutoCorrector) + def on_send(node); end def uri_parser_new?(node = T.unsafe(nil)); end end diff --git a/Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.4.rbi b/Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.5.rbi similarity index 99% rename from Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.4.rbi rename to Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.5.rbi index ad5f1befb1b00..3880d3e8a6c47 100644 --- a/Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.4.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.5.rbi @@ -173,8 +173,8 @@ class Tapioca::Compilers::SymbolTable::SymbolGenerator def compile_object(name, value); end sig { params(constant: Module).returns(String) } def compile_props(constant); end - sig { params(signature: T.untyped).returns(String) } - def compile_signature(signature); end + sig { params(signature: T.untyped, parameters: T::Array[[Symbol, String]]).returns(String) } + def compile_signature(signature, parameters); end sig { params(name: String, constant: Module).returns(T.nilable(String)) } def compile_subconstants(name, constant); end sig { params(constant: Class).returns(String) } diff --git a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi index f963cbfa5082a..961aa470c4066 100644 --- a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi +++ b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi @@ -8162,6 +8162,8 @@ module Homebrew::EnvConfig def self.temp(); end + def self.update_report_only_installed?(); end + def self.update_to_tag?(); end def self.verbose?(); end