From 4c1b2630dcf99793e8ecfed60c441dd080418401 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 28 Dec 2020 13:34:07 +0000 Subject: [PATCH] Fix sorbet errors. --- Library/Homebrew/cache_store.rb | 18 +++++++++--------- Library/Homebrew/utils/spdx.rb | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Library/Homebrew/cache_store.rb b/Library/Homebrew/cache_store.rb index 51c4492529..e28795d4bf 100644 --- a/Library/Homebrew/cache_store.rb +++ b/Library/Homebrew/cache_store.rb @@ -38,6 +38,15 @@ class CacheStoreDatabase return_value end + # Creates a CacheStoreDatabase. + # + # @param [Symbol] type + # @return [nil] + def initialize(type) + @type = type + @dirty = false + end + # Sets a value in the underlying database (and creates it if necessary). def set(key, value) dirty! @@ -120,15 +129,6 @@ class CacheStoreDatabase @db ||= {} end - # Creates a CacheStoreDatabase. - # - # @param [Symbol] type - # @return [nil] - def initialize(type) - @type = type - @dirty = false - end - # The path where the database resides in the `HOMEBREW_CACHE` for the given # `@type`. # diff --git a/Library/Homebrew/utils/spdx.rb b/Library/Homebrew/utils/spdx.rb index 65a307770f..1fe89ae6fa 100644 --- a/Library/Homebrew/utils/spdx.rb +++ b/Library/Homebrew/utils/spdx.rb @@ -39,8 +39,8 @@ module SPDX end def parse_license_expression(license_expression) - licenses = [] - exceptions = [] + licenses = T.let([], T::Array[T.any(String, Symbol)]) + exceptions = T.let([], T::Array[String]) case license_expression when String, Symbol