Satisfy brew typecheck and style

This commit is contained in:
Sam Ford 2020-12-19 02:22:03 -05:00
parent 8ea9ec8176
commit f93ecd7d55
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE

View File

@ -68,7 +68,7 @@ module Homebrew
# Checks the content at the URL for new versions.
sig { params(url: String, regex: T.nilable(Regexp)).returns(T::Hash[Symbol, T.untyped]) }
def self.find_versions(url, regex, &block)
raise ArgumentError, "The #{name.demodulize} strategy does not support regular expressions." if regex
raise ArgumentError, "The #{T.must(name).demodulize} strategy does not support a regex." if regex
match_data = { matches: {}, regex: regex, url: url }